I have Ipython installed but it runs on python 2.7.5 , I also have python 3.3 installed. How can I make changes such that Ipython runs on python 3.3 not 2.7.5?
相关问题
- Django __str__ returned non-string (type NoneType)
- How to postpone/defer the evaluation of f-strings?
- ImportError shows up with py.test, but not when ru
- Flush single app django 1.9
- Comparing pd.Series and getting, what appears to b
相关文章
- 现在使用swift开发ios应用好还是swift?
- Visual Studio Code, MAC OS X, OmniSharp server is
- Airflow depends_on_past explanation
- Is there a size limit for HTTP response headers on
- Raspberry Pi-Python: Install Pandas on Python 3.5.
- xcode 4 garbage collection removed?
- IntelliJ IDEA can't open projects or add SDK o
- Automator: How do I use the Choose from List actio
You need to install
pip
for Python 3 - it's as easy as going to thepip-installer.org
Installation page and following the instructions. Briefly, downloadget-pip.py
and save it someplace, like yourDownloads
folder. Navigate there in Terminal, and runand you should soon have either a
pip3
orpip-3.3
command (maybe both, I don't remember). You should now be able to runand hopefully all the dependencies will be installed as well. If installation chokes, use
pip3
to installpyzmq
,tornado
,pyreadline
,jinja2
,pygments
, and maybe a few others. Make sure you read the docs before you start, so you have an idea of what you're trying to achieve. IPython is large and quite complex, with many moving parts, so in the absence of a package manager (see below) it can take a bit of time before everything is up and running.The Package Manager Way
There are other options, too. You can install Anaconda, a "Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing" with over 100 packages, including IPython and its dependencies. By default, the Anaconda installer gives you Python 2.7, but you can use the
conda
command to install Python 3.My personal favorite is to install Python 3 and IPython using MacPorts. Yes, it'll install Py3 all over again, but unless you're really starving for disk space (in which case you probably don't want to be installing large packages like IPython) it's no big deal. Using the
port
command, once the base MacPorts installation has been put in place, you can just runand all the other dependencies will be taken care of, (hopefully) flawlessly, without your having to do anything else except wait for a long time while things like PyQt are compiled. You may also need to run
sudo port install py33-ipython +notebook
if you want the notebook, I don't recall if it's installed otherwise. BTW, you do need X11, Xcode, and the Xcode command-line tools for MacPorts, but they would likely be required if you do the first option as not all packages have binaries available for OS X. The excellent documentation walks you through everything, from installation to using theport
command to maintaining your system. I would highly recommend modifying your~/.profile
(or~/.bash_profile
,~/.bashrc
, or equivalent for your shell) to add the MacPorts install directories (/opt/local/bin
and/opt/local/sbin
, by default) to the front of your path. Just addexport PATH='/opt/local/bin:/opt/local/sbin:$PATH'
to the end of the file.A third alternative option is to use Homebrew. It's similar to MacPorts, in that the
brew
command is a type of package manager likeport
andconda
, but in my experience it doesn't have as many packages, and doesn't quite work as seamlessly asport
. However, my observations on StackOverflow, Ask Different and other fora seem to indicate that about 50% of people have great experiences withbrew
and don't likeport
, while the other half lovesport
overbrew
. YMMV.I hope this helps. Good luck with your installation!