【发布时间】:2014-10-17 12:32:22
【问题描述】:
刚刚在 Mac OSX Mavericks 上下载并安装了 anaconda 3.6.2,我需要安装一个未预安装 anaconda 的包 seaborn。
$ conda install seaborn
Fetching package metadata: ..
Error: No packages found in current osx-64 channels matching: seaborn
You can search for this package on Binstar with
binstar search -t conda seaborn
You may need to install the Binstar command line client with
conda install binstar
接下来我尝试使用pip来安装包
$ which pip
/Users/username/anaconda/bin/pip
$ pip install seaborn
Could not find an activated virtualenv (required).
尝试再次激活root Anaconda env,但仍然无法正常工作
$ source activate root
discarding /Users/username/anaconda/bin from PATH
prepending /Users/username/anaconda/bin to PATH
$ pip install seaborn
Could not find an activated virtualenv (required).
接下来我尝试激活一个virualenv,pip install 工作正常。
workon testEnv
pip install seaborn
现在我从 Anaconda 的启动器启动了iPython notebook。但是seaborn这个包好像没有找到!
seaborn 包真的安装了吗?
在~/bashprofile,我有:
# virutalenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /Users/username/.virtualenvs/datasci/bin/virtualenvwrapper.sh
# added by Anaconda 2.0.1 installer
export PATH="/Users/username/anaconda/bin:$PATH"
更新
删除了 2 个 virtualenvwrapper 行,重新加载了 .bash_profile,但 pip install 仍然给出错误 Could not find an activated virtualenv (required). 激活另一个 conda 环境 source activate testenv 没有帮助。
$ source activate ~/.bash_profile
$ pip install seaborn
Could not find an activated virtualenv (required).
$ source activate testenv
discarding /Users/username/anaconda/bin from PATH
prepending /Users/username/anaconda/envs/testenv/bin to PATH
$ pip install seaborn
Could not find an activated virtualenv (required).
【问题讨论】:
-
这个问题你解决了吗?