我已将Anaconda安装到我拥有特权的目录中,但是我无法让Sublime Text 3识别出现在使用Anaconda Python的shell:
>which python
/local/home/USER/Apps/anaconda/bin/python
当我使用从同一 shell 启动的 Sublime 进行构建时:
import astropy
print astropy.__file__
这个路径是不同的: /soft/python-SL7/lib/python2.7/site-packages/astropy/init.pyc
我的.tcshrc文件内容如下:
setenv PATH /local/home/USER/Apps/anaconda/bin:${PATH}
alias subl /local/home/USER/Apps/sublime_text_3/sublime_text
我的 .bashrc 文件(虽然不应该使用它)如下:
export PATH="/local/home/sread/Apps/anaconda/bin:$PATH"
有什么想法吗?
["which", "python"]
和["which", "/local/home/USER/Apps/anaconda/bin/python"]
替换了cmd。两个命令都返回/local/home/USER/Apps/anaconda/bin/python
。因此,shell 是正确的,它只是一直从/soft/python-SL7/lib/python2.7/site-packages
导入。 - Lucidnonsensepip install astropy --update
时,它会完成并表示已安装先前的版本。这可能有关吗? - Lucidnonsensepip
而言,pip -V
返回的是什么?它应该告诉你它关联的是哪个 Python 可执行文件。至于另一个问题,你在.tcshrc
或.bashrc
中设置了PYTHONPATH
变量吗? - MattDMopip -V
返回anaconda路径)。 - LucidnonsenseConda
包。 - MattDMo