问题
I want to install python packages after virtualenv is created by conda. But I got the following error, does anyone know how to install packages into virtualenv created by conda ?
/Users/jzhang/anaconda/lib/python3.5/site-packages
(env_2) jzhangMBPr:env_2 jzhang$ conda install numpy
Fetching package metadata .........
CondaEnvironmentNotFoundError: Could not find environment: /Users/jzhang/anaconda/envs/env_2 .
You can list all discoverable environments with `conda info --envs`.
回答1:
I didn't use conda but as far as I understand from the docs, it should work like this:
- Create your env
conda create --name snowflakes biopython - Activate your env
source activate snowflakes - Install what you need
conda install what-you-wantorpip install what-you-want
回答2:
First, enter into an environment that you have created by the following command:
activate your_environment_name
Then, you will be in particular in your environment. Now, you can install numpy using this command:
conda install -c anaconda numpy
来源:https://stackoverflow.com/questions/41801382/how-to-install-packages-into-specific-virtualenv-created-by-conda