【发布时间】:2017-11-01 14:34:46
【问题描述】:
我想创建一个空白/空 conda 环境,但新创建的环境似乎正在从 root 或其他环境中获取包。我已经在系统上以 root 身份安装了这些软件包(例如 bedtools、bwa 等),也安装到了其他 conda 环境中,但想要制作一个干净的软件包(为了可重复性)。 p>
这是预期的行为吗?我该如何调试?
我正在(试图)关注这个答案:https://stackoverflow.com/a/37216638/3294994
$ conda env create -n test-env python
$ source activate
$ conda env export
name: test-env
channels:
- conda-forge
- biconda
- anaconda
- defaults
dependencies
...
python=3.6.2=0
bcftools=1.6=0
bedtools=2.26.0=0
bwa=0.7.15=1
...
picard=2.14=py36_0
...
关于环境的一些信息如下:
$ conda info
Current conda install:
platform : linux-64
conda version : 4.3.27
conda is private : False
conda-env version : 4.3.27
conda-build version : not installed
python version : 3.6.1.final.0
requests version : 2.14.2
root environment : /home/obk/anaconda3 (writable)
default environment : /home/obk/anaconda3/envs/tttest2
envs directories : /home/obk/anaconda3/envs
/home/obk/.conda/envs
package cache : /home/obk/anaconda3/pkgs
/home/obk/.conda/pkgs
channel URLs : https://repo.continuum.io/pkgs/main/linux-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
config file : None
netrc file : None
offline mode : False
user-agent : conda/4.3.27 requests/2.14.2 CPython/3.6.1 Linux/3.13.0-132-generic debian/jessie/sid glibc/2.19
UID:GID : 1001:1001
$ conda deactivate
$ conda info
Current conda install:
platform : linux-64
conda version : 4.3.27
conda is private : False
conda-env version : 4.3.27
conda-build version : not installed
python version : 3.6.1.final.0
requests version : 2.14.2
root environment : /home/obk/anaconda3 (writable)
default environment : /home/obk/anaconda3
envs directories : /home/obk/anaconda3/envs
/home/obk/.conda/envs
package cache : /home/obk/anaconda3/pkgs
/home/obk/.conda/pkgs
channel URLs : https://repo.continuum.io/pkgs/main/linux-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
config file : None
netrc file : None
offline mode : False
user-agent : conda/4.3.27 requests/2.14.2 CPython/3.6.1 Linux/3.13.0-132-generic debian/jessie/sid glibc/2.19
UID:GID : 1001:1001
顺便说一句,我遇到的原始问题如下:
$ source activate test-env
$ conda install jupyter
Fetching package metadata ...........
Solving package specifications: .
UnsatisfiableError: The following specifications were found to be in conflict:
- imagemagick
- jupyter
- python 3.6*
Use "conda info <package>" to see the dependencies for each package.
我猜这是因为新创建的环境test-env 中已经有包...
【问题讨论】:
-
你可以尝试运行
conda create -n test-env python而不是conda env create...吗? -
成功了! .. 正如你所指出的,我刚刚意识到我没有遵循该链接的答案。