简体   繁体   English

virtualenv:无法安装模块

[英]virtualenv: cannot install modules

I am trying to run some python scripts on HPC cluster. 我试图在HPC群集上运行一些python脚本。 My scripts required some python modules that were not in the cluster and I do not have permission to install them (through sudo ). 我的脚本需要一些不在集群中的python模块,并且我没有权限安装它们(通过sudo )。 This is why I created a virtualenv (in my directory on the HPC cluster). 这就是为什么我创建了virtualenv (在HPC群集上的目录中)的原因。 I successfully installed numpy but cannot insall: re , collections , time , csv and some more. 我成功安装了numpy,但无法安装: recollectionstimecsv等。 The error that I get is this: Could not find a version that satisfies the requirement csv (from versions: ) No matching distribution found for csv I am new to python and this seems completely weird to me, since I was following the steps found on two different sources. 我得到的错误是: Could not find a version that satisfies the requirement csv (from versions: ) No matching distribution found for csv我是python的新手,这对我来说似乎很奇怪,因为我正在遵循在上找到的步骤两种不同的来源。 What should I do to fix it? 我该怎么解决? Thank you! 谢谢!

That error usually means there are no packages with those names . 该错误通常意味着没有带有这些名称的软件包。

Actually, you do not need to install those packages ( they do not exist ). 实际上,您不需要安装这些软件包(它们不存在)。 They are included in python's standard library. 它们包含在python的标准库中。 you should just import them like : 您应该像这样导入它们:

import csv
import re

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM