I am running anaconda on OS 10.11.6. I am not certain of the precise anaconda version that I previously had, but it was about 4-6 months old, I believe, and it was running Python 2.7.11. I wanted to update both python (to 2.7.12) and anaconda (while I was at it) and so I used the standard procedure of
conda update conda
conda update anaconda
This has worked swimmingly for me in the past. This time, however, it is taking me back to an earlier version of python (2.7.10) when I do this. From running conda --version I see that I have conda 4.1.11, which is the latest, as I understand it. However, when I run conda update anaconda I get a display saying:
anaconda 2.3.0 np19py27_0
Similarly, with python --version I get:
Python 2.7.10 :: Anaconda 2.3.0 (x86_64)
In my folder ~/anaconda/bin/ (which folder I also have in my PATH such that calls to python direct here) I have an alias named python which says that it was just updated today (which is when I ran the conda update, etc.). But, it just points to a file python 2.7 which is ins ~/anaconda/ and hasn't been modified since May 2015.
I figure if I did a complete uninstall and reinstall of anaconda, I could presumably clear this up. I'd rather avoid that if possible though, since it would mean reinstalling all the rest of my other python packages, etc.
I also saw this SO Post: Anaconda not updating to latest . but when I try:
conda install anaconda=4.1.1
I get the following error:
Fetching package metadata .......
Solving package specifications: ....
The following specifications were found to be in conflict:
- anaconda 4.1.1*
- gevent-websocket -> gevent 0.13.7|0.13.8|1.0|1.0.1|1.0.2|1.1.0
- gevent-websocket -> python 2.6*
Use "conda info <package>" to see the dependencies for each package.
Update: I ended up just wiping my old installation and installing a fresh version of Anaconda. It was a bit of a pain but it seemed like it would be less work than trying to track down what was happening with this bug. Still though, I'd be delighted in any solutions people have to this issue for future reference by me and others who encounter this.
Related
From the past two days, I've been trying to install scipy from the wheel file available from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy in my windows laptop 64 bit built and running Python 2.7.3. I tried running pip install scipy in the command window, it didn't work and the following error popped up in command prompt
and
I also tried typing
pip install scipy-version.whl
That didn't work too! and the same error popped up. I even updated my pip.
I read in some comments that pip doesn't work well for scipy installation. If so, what alternatives can you suggest? If not can you tell me the way to install using wheel scripts?
There are some issue while installing scipy using pip, please try using Anaconda python version which comes with all the libraries you can ever need instead of your default python.
Still if you want to use the default python refer here, as already answered here.
I am using python 2.7.10 with Anaconda 2.3.0, and I use the Anaconda IDE with sublime text 3 (is it a different Anaconda??).
However, for a course I'm taking we're required to use python 3.5.
I would like to keep python 2.7 on my computer, though. What would be the easiest way to have both versions coexist and be easily accessible through the terminal (through sublime would be great, but I'd be happy with managing it on the terminal for now)?
Also, I typically run conda update conda, and conda update anaconda on a regular basis to keep everything up to date. How would that work with different versions of python installed?
This sort of thing is actually what Anaconda is built for. Although the default Python version depends on the installer you used, Anaconda supports both versions. The easiest way is to create a new virtual environment. From the following link, use this conda command to build a Python 3 environment:
conda create -n py35 python=3.5 anaconda
That is if you need Python 3.5 with all the anaconda packages. You can either leave that blank if you just want a vanilla version of Python 3.5, or specify individual packages.
Once you do this, Python 3.5 will be available with the console command py35. You should definitely read the following link about how to manage environments. Really, you should read that whole tutorial.
Using pip with different Python version is a common problem, as I see when I search the Internet. There are a lot of answers around, also in this forum. However nobody seems to encounter the same problem that I have:
I use Canopy python most and it was installed first. Later I installed Anaconda. Now when I try to install a program with pip it always install it in Canopy (or refuse to install it because it is already installed in Canopy.
for example:
$ pip install ipython
gives:
Requirement already satisfied...
but there are no ipython in my Anaconda-folder, it is in the /Enthought/Canopy_64bit/... folder
How can I overcome this problem?
Both versions are 2.7 and even if one is 2.7.11 and the other 2.7.12, it did not work to distinguish between the two by this.
Maybe you can try the following.
Find where both pip-s reside (whereis pip, I have it on ~/anaconda2/bin), then cd to the pip directory of the python version you want, and execute it from there.
I manage with the help of J. Corson comment:
When you want to use a particular Python installation, activate the desired environment. In my chase
source /home/per/anaconda_ete/bin/activate
then using pip made the installation in the anaconda python and I could install ipython and other stuff there... fine, thanks!
I have two versions of python on my RedHat 6 machine: 2.7.8 that came with the system originally and 2.7.10 that I've installed using miniconda for a project. I have to use the newer version to run some demo code for another project. The demo script produced this error:
ImportError: No module named scipy.sparse
Running pip install scipy failed with a bunch of warnings and then this:
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
numpy is already installed. That is, I get Requirement already satisfied when trying to pip install numpy.
The yum install command recommended on the SciPy install page completed fine but did not help, probably because this python version is installed at a non-default location.
Same result after building blas and lapack from source as described here
How do I get scipy to install properly?
Thx
I think you don't have lapack/blas library.
try this.
yum install python-devel python-nose python-setuptools gcc gcc-gfortran gcc-c++ blas-devel lapack-devel atlas-devel
it will install all what you need.
If you use Anaconda/miniconda, then use the conda package manager, not pip:
conda install scipy.
Value of a Peace of mind once starting always from a [Defined state]
There are many issues with pip / yum installer strategies that we, mortals, can spend ages on our attempts to get resolved.
Since I started to use the Travis Oliphant's Anaconda fully-fledged package-manager, these dependency-related / version-colliding issues simply disappeared. Well did not disappear, but principally do not appear.
Why?
Anaconda package-manager both allows one to keep separate versions ready / reconfigurable via Anaconda for individual python launches
and
Anaconda resolves updates in a smart way, one would never experience with manual/semi-manual pip/yum installers
In other words, if you strive to get rid of issues, opt to install Anaconda and start using it's (parallel) multi-versions installation / setup controls and it's smart package-manager facilities.
n.b.: this is not a commercial/spam/PR, this is just personal experience after many years of troubles with individual package updates' collisions / compatibility back-testing troubles in multi-py 2.5 / 2.6 / 2.7 installations environments
i recently started using python with xubuntu on virtualbox but i'm having problems. I want to be able to use numpy so i thought that apt-get install python-numpy would solve everything, but using the shell i kept getting No module named numpy. I used IDLE and it could find it. I also have IDLE (using Python-2.7), and again it could import numpy. Then i noticed that the shell had python 2.7.9, while the IDLEs had python 2.7.6.
Using
import sys
print sys.path
this if what i get from 2.7.9 (shell)
/usr/local/lib/python2.7/site-packages/setuptools-17.0-py2.7.egg
/usr/local/lib/python2.7/site-packages/Pillow-2.3.0-py2.7-linux-x86_64.egg
/usr/local/lib/python2.7/site-packages/mock-1.0.1-py2.7.egg
/usr/local/lib/python27.zip
/usr/local/lib/python2.7
/usr/local/lib/python2.7/plat-linux2
/usr/local/lib/python2.7/lib-tk
/usr/local/lib/python2.7/lib-old
/usr/local/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/site-packages
and from 2.7.6 (IDLE)
/home/alessandro
/usr/bin
/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/PILcompat
/usr/lib/python2.7/dist-packages/gtk-2.0
/usr/lib/pymodules/python2.7
/usr/lib/python2.7/dist-packages/ubuntu-sso-client
I understand that i have two versions of python installed and somehow i ended up installing packageg into only one of them (the 2.7.6).
I'd like to be able to use 2.7.9 both in the shell and in IDLE and also i'd like to install so that python 2.7.9 can see them.
I read that i can add paths to the python sys.path, but isn't there a more efficient/persistent way to do what i want?
PS: tell me if you need more informations
For my projects I usually create a virtualenv for each python version I need for the project at hand. I manage them using pip to install specific versions that I need. Moreover you should be able to choose the python path in your IDE. While I'm not using IDLE, I read here that apparently idle comes along with the python versions during install. So maybe your idle versions collide with each other. If you want to have only one python version at the time on your machine you might consider a simple remove and fresh install of your desired version. Again I would recommend pip over apt-get etc. Hope this is of help for you.
Worth to check PyDev, a plugin for Eclipse to work on python.
http://marketplace.eclipse.org/content/pydev-python-ide-eclipse , or http://pydev.org/.
This allows you to configure the python version for different project's.
I have some project's with python 2.7 and others with 3.4.
it's checks the whole system in search for the PYTHONPATH to use!