pip安装程序包失败:无效要求&没有匹配的分布 [英] pip install packages failing: Invalid requirement & No matching distribution

查看:1527
本文介绍了pip安装程序包失败:无效要求&没有匹配的分布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在python 3.6.3虚拟环境中安装软件包.我不断收到错误消息.

I am trying to install packages in a python 3.6.3 virtual environment. I keep getting errors.

我尝试了使用--ignore-installed标志的点,例如:pip install -I -r package-list.txt.

I have tried pip with --ignore-installed flag like: pip install -I -r package-list.txt.

这是我在package-list.txt中拥有的一部分.

Here is part of what I have in package-list.txt.

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
_libgcc_mutex==0.1==main
appdirs==1.4.3==pypi_0
asn1crypto==0.24.0==py36_0
beautifulsoup4==4.7.1==py36_1
blas==1.0==mkl
bzip2==1.0.6==h14c3975_5
ca-certificates==2019.6.16==hecc5488_0
cairo==1.14.12==h8948797_3
certifi==2019.6.16==py36_1
cffi==1.12.1==py36h2e261b9_0
chardet==3.0.4==py36_1
cloudpickle==0.8.0==pypi_0
cryptography==2.5==py36h1ba5d50_0
cycler==0.10.0==pypi_0
dask==1.1.4==pypi_0
decorator==4.4.0==pypi_0
ffmpeg==4.0==hcdf2ecd_0
fontconfig==2.13.0==h9420a91_0
freeglut==3.0.0==hf484d3e_5
freetype==2.9.1==h8a8886c_1
fuzzywuzzy==0.17.0==py_0
glib==2.56.2==hd408876_0
graphite2==1.3.13==h23475e2_0
harfbuzz==1.8.8==hffaf4a1_0
hdf5==1.10.2==hba1933b_1
icu==58.2==h9c2bf20_1
idna==2.8==py36_0
intel-openmp==2019.3==199
jasper==2.0.14==h07fcdf6_1
jpeg==9b==h024ee3a_2
kiwisolver==1.0.1==pypi_0
libedit==3.1.20181209==hc058e9b_0
libffi==3.2.1==hd88cf55_4
libgcc-ng==8.2.0==hdf63c60_1
libgfortran-ng==7.3.0==hdf63c60_0
libglu==9.0.0==hf484d3e_1
...

使用第一个软件包_libgcc_mutex==0.1==main时,出现此错误:

With first package _libgcc_mutex==0.1==main I get this error:

Ignoring pip: markers 'python_version < "3"' don't match your environment
ERROR: Invalid requirement: '_libgcc_mutex==0.1==main' (from line 4 of package-list3.txt)

没有_libgcc_mutex==0.1==main我得到:

Ignoring pip: markers 'python_version < "3"' don't match your environment
Looking in links: /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/avx2, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic
Collecting appdirs==1.4.3==pypi_0 (from -r package-list2.txt (line 4))
  ERROR: Could not find a version that satisfies the requirement appdirs==1.4.3==pypi_0 (from -r package-list2.txt (line 4)) (from versions: 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3)
ERROR: No matching distribution found for appdirs==1.4.3==pypi_0 (from -r package-list2.txt (line 4))

推荐答案

您的文件在注释部分中指出应该与conda一起使用,它不是requirements.txt而是yml文件.尝试使用文件中列出的命令:

Your file states in the comment section that it is supposed to be used with conda, it is not a requirements.txt but a yml file. Try using the command listed in the file:

conda create --name <env> --file <this file>

如果要基于该文件修改当前环境,请尝试(在您的环境中):

If you want to modify your current environment based on that file, try (while inside of your environment):

conda env update --file <your file>

这篇关于pip安装程序包失败:无效要求&amp;没有匹配的分布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆