How to install packages into specific virtualenv created by conda

淺唱寂寞╮ 提交于 2019-12-10 18:23:18

问题


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:

  1. Create your env conda create --name snowflakes biopython
  2. Activate your env source activate snowflakes
  3. Install what you need conda install what-you-want or pip 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!