我是conda的新手,我对它的工作方式只有非常表面的了解。 我的目标是使用conda安装注释软件(该死的)。 Conda的安装如下:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && bash miniconda.sh -b -p $HOME/miniconda
echo 'export PATH="$HOME/miniconda/bin:$PATH"' >> $HOME/.bashrc
然后我创建了一个环境,设置了频道,并安装了我的软件:
conda create -n dammit python=3
source activate dammit
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
conda install dammit
当我尝试运行主脚本时发生错误
Traceback (most recent call last):
File "./dammit", line 5, in <module>
from dammit import app
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/dammit/app.py", line 13, in <module>
from dammit import annotate
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/dammit/annotate.py", line 13, in <module>
from shmlast.app import CRBL
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/shmlast/app.py", line 3, in <module>
from doit.tools import run_once, create_folder
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/doit/__init__.py", line 33, in <module>
from doit.doit_cmd import get_var
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/doit/doit_cmd.py", line 14, in <module>
from .cmd_run import Run
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/doit/cmd_run.py", line 8, in <module>
from .runner import Runner, MRunner, MThreadRunner
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/doit/runner.py", line 8, in <module>
import cloudpickle
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/cloudpickle/__init__.py", line 7, in <module>
from cloudpickle.cloudpickle import *
File "/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages/cloudpickle/cloudpickle.py", line 61, in <module>
import typing
File "/opt/lib/python2.7/site-packages/typing.py", line 624, in <module>
AnyStr = TypeVar('AnyStr', bytes, unicode)
看来问题出在python 2.7库的键入包中。我已经在该死的环境中安装了带有conda的type.py,但是发生了同样的错误。如何解决此问题,并使用“导入命令”在dammit / lib / python lib中进行搜索?
这是sys.path:
['', '/opt/python', '/opt/lib64/python2.7/site-packages', '/opt/lib/python2.7/site-packages', '/opt/lib64/python3.7/site-packages', '/opt/lib/python3.7/site-packages', '/home/up201505534', '/home/up201505534/miniconda/envs/dammit/lib/python36.zip', '/home/up201505534/miniconda/envs/dammit/lib/python3.6', '/home/up201505534/miniconda/envs/dammit/lib/python3.6/lib-dynload', '/home/up201505534/miniconda/envs/dammit/lib/python3.6/site-packages']
和PYTHONPATH:
/opt/python:/opt/lib64/python2.7/site-packages:/opt/lib/python2.7/site-packages:/opt/lib64/python3.7/site-packages:/opt/lib/python3.7/site-packages: