-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
locked[bot] locked due to inactivity[bot] locked due to inactivity
Description
I normally use pip to handle all the packages in my system:
$ pip-2.7 install numpy --user
$ /usr/bin/python2.7 -c "import numpy; print numpy.version.version"
1.8.0
so they get installed in ~/.local/python2.7/site-packages. Then I wanted to give conda a try, so I did this:
$ ./Miniconda[...].sh
# No PYTHONPATH defined
# Prepend .anaconda to PATH: yes
$ [new shell] conda update conda
$ conda install numpy==1.7.1
$ ./.anaconda/bin/python2.7 -c "import numpy; print numpy.version.version"
1.8.0
I still cannot reach the 1.7.1 version installed with conda. If I remove the .local one, I can use the conda version again.
$ ./.anaconda/bin/python2.7 -c "import sys; from pprint import pprint as p; p(sys.path)"
['',
'/home/juanlu/.anaconda/lib/python27.zip',
'/home/juanlu/.anaconda/lib/python2.7',
'/home/juanlu/.anaconda/lib/python2.7/plat-linux2',
'/home/juanlu/.anaconda/lib/python2.7/lib-tk',
'/home/juanlu/.anaconda/lib/python2.7/lib-old',
'/home/juanlu/.anaconda/lib/python2.7/lib-dynload',
'/home/juanlu/.local/lib/python2.7/site-packages',
'/home/juanlu/.anaconda/lib/python2.7/site-packages']
It seems the path is not correctly handled.
>>> import sys
>>> sys.path.append(sys.path.pop(-2))
>>> p(sys.path)
['',
'/home/juanlu/.anaconda/lib/python27.zip',
'/home/juanlu/.anaconda/lib/python2.7',
'/home/juanlu/.anaconda/lib/python2.7/plat-linux2',
'/home/juanlu/.anaconda/lib/python2.7/lib-tk',
'/home/juanlu/.anaconda/lib/python2.7/lib-old',
'/home/juanlu/.anaconda/lib/python2.7/lib-dynload',
'/home/juanlu/.anaconda/lib/python2.7/site-packages',
'/home/juanlu/.local/lib/python2.7/site-packages']
>>> import numpy; numpy.version.version
'1.7.1'
Notice that the only entry that matters is site-packages
.
braham-snyder, mkobit, yzsatgithub and ChristofKaufmann
Metadata
Metadata
Assignees
Labels
locked[bot] locked due to inactivity[bot] locked due to inactivity