Python pip无法从requirements.txt中找到任何包

Python pip无法从requirements.txt中找到任何包,python,pip,package,pypi,requirements.txt,Python,Pip,Package,Pypi,Requirements.txt,我有一个requirements.txt文件,其中列出了以下软件包: appdirs==1.4.3 APScheduler==3.3.1 asn1crypto==0.22.0 bcrypt==3.1.3 boto3==1.4.4 botocore==1.5.72 当我执行pip安装-q-U-r requirements.txt时;我收到以下错误: 找不到满足appdirs==1.4.3要求的版本 (来自-r requirements.txt(第1行))(来自版本:) 找不到appdirs==1

我有一个
requirements.txt
文件,其中列出了以下软件包:

appdirs==1.4.3
APScheduler==3.3.1
asn1crypto==0.22.0
bcrypt==3.1.3
boto3==1.4.4
botocore==1.5.72
当我执行
pip安装-q-U-r requirements.txt时
;我收到以下错误:

找不到满足appdirs==1.4.3要求的版本 (来自-r requirements.txt(第1行))(来自版本:)
找不到appdirs==1.4.3(来自-r requirements.txt(第行))的匹配分布 1) )

但是,以下工作:

$ pip install appdirs
Collecting appdirs
  Downloading appdirs-1.4.3-py2.py3-none-any.whl
Installing collected packages: appdirs
Successfully installed appdirs-1.4.3
手动安装appdirs后,我再次尝试从需求运行:

$ pip install -q -U -r requirements.txt
  Could not find a version that satisfies the requirement APScheduler==3.3.1 (from -r requirements.txt (line 2)) (from versions: )
No matching distribution found for APScheduler==3.3.1 (from -r requirements.txt (line 2))
我现在尝试指定下一个命令的确切版本:

$ pip install APScheduler==3.3.1           
Collecting APScheduler==3.3.1
  Downloading APScheduler-3.3.1-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 2.8MB/s 
Collecting tzlocal>=1.2 (from APScheduler==3.3.1)
  Downloading tzlocal-1.4.tar.gz
Collecting funcsigs; python_version == "2.7" (from APScheduler==3.3.1)
  Downloading funcsigs-1.0.2-py2.py3-none-any.whl
Collecting six>=1.4.0 (from APScheduler==3.3.1)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting pytz (from APScheduler==3.3.1)
  Downloading pytz-2017.2-py2.py3-none-any.whl (484kB)
    100% |████████████████████████████████| 491kB 2.2MB/s 
Requirement already satisfied: setuptools>=0.7 in ./.env/lib/python2.7/site-packages (from APScheduler==3.3.1)
Collecting futures; python_version == "2.7" (from APScheduler==3.3.1)
  Downloading futures-3.1.1-py2-none-any.whl
Building wheels for collected packages: tzlocal
  Running setup.py bdist_wheel for tzlocal ... done
  Stored in directory: $HOME/.cache/pip/wheels/dc/d6/f0/84194ccbdd3e2551bdb207e1fc1925efd32956c5767328103b
Successfully built tzlocal
Installing collected packages: pytz, tzlocal, funcsigs, six, futures, APScheduler
Successfully installed APScheduler-3.3.1 funcsigs-1.0.2 futures-3.1.1 pytz-2017.2 six-1.11.0 tzlocal-1.4
如果指定
要求
文件,pip如何无法找到包?为什么它总是发现没有它的包是一样的呢

PS:一切都在名为
.env
虚拟环境中进行



执行
pip--verbose
命令将给出:

Collecting asn1crypto==0.22.0 (from -r requirements.txt (line 3))
  1 location(s) to search for versions of asn1crypto:
  * https://pip.<domain>/asn1crypto/
  Getting page https://pip.<domain>/asn1crypto/
  Looking up "https://pip.<domain>/asn1crypto/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pip.<domain>
  "GET /asn1crypto/ HTTP/1.1" 303 0
  Status code 303 not in [200, 203, 300, 301]
  Looking up "https://pip.<domain>/simple/asn1crypto/" in the cache
  No cache entry available
  "GET /simple/asn1crypto/ HTTP/1.1" 303 0
  Status code 303 not in [200, 203, 300, 301]
  Starting new HTTP connection (1): pypi.python.org
  "GET /simple/asn1crypto/ HTTP/1.1" 403 16
  Could not fetch URL https://pip.<domain>/asn1crypto/: 403 Client Error: SSL is required for url: http://pypi.python.org/simple/asn1crypto/ - skipping
  Could not find a version that satisfies the requirement asn1crypto==0.22.0 (from -r requirements.txt (line 3)) (from versions: )
Cleaning up...
No matching distribution found for asn1crypto==0.22.0 (from -r requirements.txt (line 3))
收集asn1crypto==0.22.0(来自-r requirements.txt(第3行))
1个搜索asn1crypto版本的位置:
* https://pip./asn1crypto/
获取页面https://pip./asn1crypto/
“抬头看”https://pip./asn1crypto/“在缓存中
没有可用的缓存项
正在启动新的HTTPS连接(1):pip。
“GET/asn1crypto/HTTP/1.1”303 0
状态代码303不在[200203300301]中
“抬头看”https://pip./simple/asn1crypto/“在缓存中
没有可用的缓存项
“GET/simple/asn1crypto/HTTP/1.1”303 0
状态代码303不在[200203300301]中
正在启动新的HTTP连接(1):pypi.python.org
“GET/simple/asn1crypto/HTTP/1.1”403 16
无法获取URLhttps://pip./asn1crypto/: 403客户端错误:url需要SSL:http://pypi.python.org/simple/asn1crypto/ -跳过
找不到满足asn1crypto==0.22.0要求的版本(来自-r requirements.txt(第3行))(来自版本:)
清理。。。
找不到asn1crypto==0.22.0的匹配分布(来自-r requirements.txt(第3行))

其中
https://pip.
是我们的自定义托管。

您需要将pypi服务器上的
回退url
设置为
https
url,因为
pypi.python.org
现在只允许https请求。有关更多信息,请参阅。

但去年的设置都是相同的。从今天起,它的行为开始有所不同。pip/python版本尚未更改。@hjpotter92 pypiserver中有一个pull请求来修复此问题:
Collecting asn1crypto==0.22.0 (from -r requirements.txt (line 3))
  1 location(s) to search for versions of asn1crypto:
  * https://pip.<domain>/asn1crypto/
  Getting page https://pip.<domain>/asn1crypto/
  Looking up "https://pip.<domain>/asn1crypto/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pip.<domain>
  "GET /asn1crypto/ HTTP/1.1" 303 0
  Status code 303 not in [200, 203, 300, 301]
  Looking up "https://pip.<domain>/simple/asn1crypto/" in the cache
  No cache entry available
  "GET /simple/asn1crypto/ HTTP/1.1" 303 0
  Status code 303 not in [200, 203, 300, 301]
  Starting new HTTP connection (1): pypi.python.org
  "GET /simple/asn1crypto/ HTTP/1.1" 403 16
  Could not fetch URL https://pip.<domain>/asn1crypto/: 403 Client Error: SSL is required for url: http://pypi.python.org/simple/asn1crypto/ - skipping
  Could not find a version that satisfies the requirement asn1crypto==0.22.0 (from -r requirements.txt (line 3)) (from versions: )
Cleaning up...
No matching distribution found for asn1crypto==0.22.0 (from -r requirements.txt (line 3))