问题描述
我试图通过本地文件夹中的pip安装依赖项。
我的requirements.txt
如下所示
--no-index
retrying==1.3.3
six==1.11.0
我遵循的步骤
support@vrni-platform:~$ mkdir app_depen
support@vrni-platform:~$ sudo pip install --download=/home/support/app_depen retrying==1.3.3
/home/support/app_depen
support@vrni-platform:~$ ls -lah /home/support/app_depen/
total 32K
drwxrwx--- 2 support support 4.0K Sep 15 15:04 .
drwx------ 5 support support 4.0K Sep 15 15:09 ..
-rw-r----- 1 root root 11K Sep 15 15:04 retrying-1.3.3.tar.gz
-rw-r----- 1 root root 11K Sep 15 15:04 six-1.11.0-py2.py3-none-any.whl
然后尝试通过pip进行安装,如下所示
support@vrni-platform:~$ sudo pip install -U --force-reinstall --allow-unverified --find-links=/home/support/app_depen/ -r requirements.txt
我收到以下错误
Collecting retrying==1.3.3 (from -r requirements.txt (line 2))
Could not find a version that satisfies the requirement retrying==1.3.3 (from -r requirements.txt (line 2)) (from versions: )
No matching distribution found for retrying==1.3.3 (from -r requirements.txt (line 2))
我尝试如下更改权限。 但是仍然出现相同的错误
support@vrni-platform:~$ ls -lah /home/support/app_depen/
total 32K
drwxrwx--- 2 support support 4.0K Sep 15 15:04 .
drwx------ 5 support support 4.0K Sep 15 15:09 ..
-rw-r-xr-x 1 root root 11K Sep 15 15:04 retrying-1.3.3.tar.gz
-rw-r----- 1 root root 11K Sep 15 15:04 six-1.11.0-py2.py3-none-any.whl
有人可以让我知道怎么了吗?
- Python-2.7.6
- 画中画-7.1.2
1楼
把--find-links
里面requirements.txt
像下面,然后执行sudo pip install -U -r requirements.txt
为我工作。
--no-index
--find-links /home/support/app_depen
retrying==1.3.3
six==1.11.0