从 conda 为 python 的特定版本安装包

Install package from conda for a specific version of python

我在处理 python 库方面相对较新,所以这可能是一个愚蠢的问题,但这里是详细问题:

我正在研究 Linux 并尝试使用 python 3.7 的 python 程序 (ORF-rater)。不幸的是,当我 运行 程序时,出现以下错误:

ImportError: cannot import name 'maketrans' from 'string' 

我认为这与 this issue 有关。因此我想使用另一个版本的 Python(例如 3.4 或 2.7)来支持这个 maketrans.

我正在使用的程序也使用了 Python 软件包 plastid,我使用 Conda conda install -c bioconda plastid 安装了它,我认为它运行良好。

但是,它只在 python 3.7 上安装了软件包,我找不到安装 python 3.4 的方法(我尝试了其他 pip3.4 install plastid,但是它没有用,很可能是因为我在大学服务器上工作,但我没有这样做的权限。

简而言之,如何使用 Conda 安装特定版本的 Python (3.4) 包?

以下代码创建一个具有特定 python 版本的环境(自 以来为 2.7),然后激活它并安装所需的包。

conda create -n test python=2.7
conda activate test 
conda install -c bioconda plastid
python

然后在 Python 中,我执行了以下操作并且没有出现错误

from string import maketrans