在Google Colaboratory for Python上安装和导入MDAnalysis?问题
我正在尝试在Google Colaboratory上安装、导入和MDAnalysisTests库,我尝试了三种方法,但都无效:在Google Colaboratory for Python上安装和导入MDAnalysis?问题,python,git,google-colaboratory,mdanalysis,Python,Git,Google Colaboratory,Mdanalysis,我正在尝试在Google Colaboratory上安装、导入和MDAnalysisTests库,我尝试了三种方法,但都无效: 使用默认值:!pip安装库 但我得到: Collecting MDAnalysis Using cached https://files.pythonhosted.org/packages/9e/19/1d32ded1891605facf6faf6e0de4ff6bd33db3f7983d84cfc10074363990/MDAnalysis-1.0.1.tar.g
Collecting MDAnalysis
Using cached https://files.pythonhosted.org/packages/9e/19/1d32ded1891605facf6faf6e0de4ff6bd33db3f7983d84cfc10074363990/MDAnalysis-1.0.1.tar.gz
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
我读到这类错误与缺少补充库或其他相关,但我不知道在哪里可以找到更多信息,所以我希望,也许这个论坛中的某个人知道MDAnalysis是否需要一些特定的信息。我不知道什么是egg_info,搜索时我在代码中找到了一个文本为#egg=的示例,但我在上一次尝试中详细介绍了这个选项
E: Unable to locate package MDAnalysis
Collecting git+https://github.com/MDAnalysis/mdanalysis.git
Cloning https://github.com/MDAnalysis/mdanalysis.git to /tmp/pip-req-build-4e7svv83
Running command git clone -q https://github.com/MDAnalysis/mdanalysis.git /tmp/pip-req-build-4e7svv83
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
两者都不起作用
!pip install git+https://github.com/MDAnalysis/mdanalysis.git
输出:
E: Unable to locate package MDAnalysis
Collecting git+https://github.com/MDAnalysis/mdanalysis.git
Cloning https://github.com/MDAnalysis/mdanalysis.git to /tmp/pip-req-build-4e7svv83
Running command git clone -q https://github.com/MDAnalysis/mdanalysis.git /tmp/pip-req-build-4e7svv83
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
我发现了git+git:,git+ssh:的变体,但没有起作用
这是在Colab上工作的MDAnalysis的一个特定问题吗?还是代码有问题?我甚至试着将“MDAnalysis”改为“MDAnalysis”。我在这个论坛上安装和预览问题,但是我没有结果。感谢阅读。您可以使用conda在Colab中安装MDA(需要一段时间)
!wget-O mini.shhttps://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh
!bash./mini.sh-b-f-p/usr/local
!conda安装-q-y--prefix/usr/local-c conda forge mdanalysis
导入系统
sys.path.append(“/usr/local/lib/python3.7/site packages/”)
然后你可以导入它
将MDAnalysis导入为mda
您确定python安装正常吗?您可以安装其他pip软件包吗?您也可以尝试pip3
如果在MDAnalysis需要python3Thanks来回答@Mitchell的情况下安装了多个python版本,我不知道pip3
存在,现在我尝试了!pip3安装MDAnalysis
,我得到了下一个输出:正在下载收集MDAnalysishttps://files.pythonhosted.org/packages/9e/19/1d32ded1891605facf6faf6e0de4ff6bd33db3f7983d84cfc10074363990/MDAnalysis-1.0.1.tar.gz (3.8MB)|████████████████████████████████| 3.8MB 5.4MB/s错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获得完整的命令输出。
相同的错误,但我不知道检查日志的位置,我修改了示例数据绑定器,但没有任何错误。这很奇怪,我尝试了!pip2安装MDAnalysis
并开始安装,我认为colab现在不适用于python2,从1月份开始,我有一个错误错误:fastai 0.7.0对chnow有要求我不能使用导入MDAnalysis
我有一个错误:ModuleNotFoundError:没有名为“MDAnalysis”的模块,但它已经安装。从源代码安装MDAnalysis需要一个运行正常的C/C++编译器和大量依赖项。虽然pip3安装“应该”起作用,但它取决于安装了完整的开发环境。你能用conda安装吗?如果您查看,则会看到conda安装的基本说明。最后,考虑在用户邮件列表中问你的问题——大多数MtDead开发者都会阅读它,并且更容易启动对话。绝对棒极了!成功了,科拉布在317年代安装了康达。之后,我安装了带有的测试包!conda安装-c conda forge MDAnalysisTests
我运行了一些示例,它工作得非常好。谢谢你@kokarot!我想问更多的问题,!conda install-q-y--prefix/usr/local
是一个常量行,可以用这个方法安装每个包吗?你只放了第一次,然后你就可以使用conda安装方法了?