【问题标题】:python2.7.12 do not contain numpy also not pip so i cant run my program in gromacspython2.7.12 不包含 numpy 也不包含 pip 所以我无法在 gromacs 中运行我的程序
【发布时间】:2019-07-28 18:17:19
【问题描述】:

我手动下载 Python 2.7.12,因为在我的魅力文件中 python2.7.15+ 不起作用。

在我的 Python 2.7.12 中没有 pip 命令,所以我无法安装 networkx 和 numpy 包。

我能做什么来跑步

python cgenff_charmm2gmx.py JZ4 jz4_fix.mol2 jz4.str charmm36-mar2019.ff

我正在尝试在我的 python 2.7.12 上增强 pip。但这也会报错:

suchi@DESKTOP-TR0BVV2:/mnt/c/Users/Microsoft/Desktop/Gromacs/Complex1$ python cgenff_charmm2gmx_py3.py UNK1 jz4_fix.mol2 jz4.str charmm36-jul2017.ff 回溯(最近一次通话最后): 文件“cgenff_charmm2gmx_py3.py”,第 50 行,在 将 numpy 导入为 np ImportError:没有名为“numpy”的模块 suchi@DESKTOP-TR0BVV2:/mnt/c/Users/Microsoft/Desktop/Gromacs/Complex1$

============ DONE ============
Conversion complete.
The molecule topology has been written to jz4.itp
Additional parameters needed by the molecule are written to jz4.prm, which needs to be included in the system .top
============ DONE ============

【问题讨论】:

    标签: python g++


    【解决方案1】:

    您可以先手动安装 pip。下载get-pip.py然后执行 使用下面的命令。

    # download the get-pip.py
    wget https://bootstrap.pypa.io/get-pip.py
    
    # use these 2 commands to make sure you have selected the right python
    which python
    python --version
    
    # install pip, should work for both python2 and python3
    python get-pip.py
    

    然后,您几乎可以安装所需的所有软件包。 例如,

    python -m pip install numpy
    

    安装numpy

    【讨论】:

    • 如何执行get-pip.py?
    • 首先,使用which python检查您使用的是哪个python,并确保您选择了您想要的;然后python get-pip.py.
    • 对了,可以考虑anaconda,配置比较方便。并且 conda 创建了独立的环境,所以你不会把不同版本的 python 搞砸。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-27
    • 2018-10-19
    • 1970-01-01
    • 2015-08-16
    • 2016-01-11
    • 2013-12-17
    • 2010-11-14
    相关资源
    最近更新 更多