ipython will not work even after reinstalling - ipython

Im trying very hard to get ipython notebook to work. I got it working in terminal, but I can't get it to work in my browser.
When I type ipython notebook in terminal, it says -bash: ipython: command not found
MacBook-Air:~ me$ sudo easy_install https://github.com/ipython/ipython/tarball/master
Downloading https://github.com/ipython/ipython/tarball/master
error: None
MacBook-Air:~ me$ ipython
-bash: ipython: command not found
Im really unsure why this is happening.

You do not need to (and you probably shouldn't) do sudo easy_install it will probably install things as root, avoid sudo. Check that ipython executable is in your $PATH.
github tarballs are broken for IPython. You do have to deep clone with git if you want to run master, then run python setup.py with the option you like (install, develop, symlink)...
Use pip if you want to run IPython stable.
You might have issues with readline on osx (wrong multiline editting, wrong completion, IPython popping error messages at launch time) this is one of the rare case where you might have to using easy_install for readline.
Maverick (10.9) has issues with python/numpy/matplotlib you might need to have a custom python build with homebrew that does not use system libs.

Related

I can not install OpenMDAO

I have installed Anaconda since it was recommended to use in the OpenMDAO's website. After that I typed pip install 'openmdao[all]' as instructed. However I get an error message saying, "ERROR: Invalid requirement: "'openmdao[all]'"" I was wondering how can I solve this issue. I have no knowledge about the Python or anaconda therefore I don't have a clue what to do about this situation. I searched the internet however I didn't find a solution to this. Thanks in advance!
It's possible you're running the wrong pip executable. Try which pip - it should be located under your home directory instead of a system path such as /bin/pip or /usr/bin/pip.
Make sure you've created and activated an environment in Anaconda:
conda create -n myenv pip
conda activate myenv
python -m pip install 'openmdao[all]'
That command sequence will give the highest chance of success. The single quotes are required for shells like zsh.
Remove the single quotes:
pip install openmdao[all]

mkvirtualenv: command not found Git Bash Windows

I'm following the Django installation tutorial for Windows. I ran the installation command below and it worked fine.
pip install virtualenvwrapper-win
However, when I try running mkvirtualenv myproject I get an error saying bash: mkvirtualenv: command not found
I am running Git Bash on Windows. I found a solution for the Windows Command Prompt here, but I was hoping to use Git Bash, because I'm much more familiar with it.
Thanks!
Maybe it is too late to answer this, but let me put my anser here anyhow.
I ran the pip install command twice, and finally everything is working for me. Just run "pip install" line this:
First do it: "pip install virtualenv virtualenvwrapper"
Second, do it: "pip install virtualenvwrapper-win"
Everything should be fine after that.

Syntax error while installing seaborn using conda

I've recently tried to install seaborn on ipython, which the latter was installed using anaconda. However, when I ran conda install seaborn, i was returned with a syntax error. I tried again with conda install -c anaconda seaborn=0.7.0 this time but syntax error was returned again. Apologies for my limited programming knowledge, but could anyone provide advice on how to resolve this issue?
conda is a command line tool, not a Python function. You should be typing these commands in a bash (or tcsh, etc.) shell, not in the IPython interpreter.

How to run "sudo ipython notebook" in browser without using Anaconda "ipython notebook"?

I have two pythons installed on my ubuntu
sudo which python
which python(anaconda).
And both pythons have ipython installed in it. When I run ipython notebook (anaconda) it simply takes me to the browser and works perfectly. But, when I run it like sudo ipython notebook (calling from systems python) it gives me an error. I want run ipython in browser in both cases.
What I do:
Iresolved it using this command sudo apt-get install ipython-notebook. Actually sudo pip doesn't work i think. Therefore i tried that and installed ipython-notebook and then i tried "sudo ipyton notebook" and it worked! :

How to autosave ipython notebook

Does anyone know if there's an option (or a suggested hack) to make IPython notebooks save automatically before executing a cell?
Many times I've been working on something without saving for quite some time, then I execute a stupid command that prints so much crap to the console that my browser becomes unresponsive, leading to me losing all my work.
A timed autosave might also do the trick.
The development version has that feature fully implemented. Install it by following the instructions on the ipython github.
Instructions form the repo:
If you want to hack on certain parts, e.g. the IPython notebook, in a
clean environment (such as a virtualenv) you can use pip to grab the
necessary dependencies quickly:
$ git clone --recursive https://github.com/ipython/ipython.git
$ cd ipython
$ pip install -e ".[notebook]"
This installs the necessary
packages and symlinks IPython into your current environment so that
you can work on your local repo copy and run it from anywhere:
$ ipython notebook
Updating iPython Notebook solved several problems I had with iPython Notebook; for instance, it autosaves, or auto-correction is disabled, or %matplotlib inline works now (before updating, I had to use --pylab inline in the command line when I was running $ipython notebook).
As I use coda on my mac, I updated iPython Notebook via conda:
$conda update ipython
You could simply set a lower interval for autosave feature using the following magic command:
%autosave 60
in order to save automatically your notebook every 60 seconds.