本文介绍了无法在Anaconda中点子安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只需在Mac OSX Mavericks上下载并安装了anaconda 3.6.2,我需要安装一个尚未随anaconda预先安装的软件包seaborn.

Just downloaded and installed anaconda 3.6.2 on Mac OSX Mavericks and I need to install a package seaborn which is not pre-installed with anaconda.

$ 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安装软件包

Next I tried to use pip to install the package

$ which pip
/Users/username/anaconda/bin/pip

$ pip install seaborn
Could not find an activated virtualenv (required).

尝试再次激活root Anaconda env,但仍然无法正常工作

Tried activating root Anaconda env again, but still does not work

$ 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起作用.

Next I tried activating a virualenv and pip install works.

workon testEnv
pip install seaborn

现在,我从Anaconda的启动器中启动了iPython notebook.但是似乎找不到seaborn包!

Now I launched iPython notebook from Anaconda's launcher. But the seaborn package does not seem to be found!

seaborn软件包真的安装了吗?

Was the seaborn package really installed?

~/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没有帮助.


Update

Removed the 2 virtualenvwrapper lines, reloaded .bash_profile, but pip install still gives the error Could not find an activated virtualenv (required). Activating another conda environment source activate testenv does not help.

$ 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).

推荐答案

我在使用Mac安装ggp​​lot时遇到了同样的问题.如果您从终端执行:

I Had the same problem installing ggplot using Mac.If you execute from Terminal:

/anaconda/bin/pip install module_name

有效.希望对您有所帮助!

it works.I hope it can help!

MC

这篇关于无法在Anaconda中点子安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 23:53