Reputation: 6872
I am trying to install dependencies via pip from a local folder. My requirements.txt
looks like below
--no-index
retrying==1.3.3
six==1.11.0
The steps I followed
support@vrni-platform:~$ mkdir app_depen
support@vrni-platform:~$ sudo pip install --download=/home/support/app_depen retrying==1.3.3
The content of /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
Then on trying to do the install via pip as shown below
support@vrni-platform:~$ sudo pip install -U --force-reinstall --allow-unverified --find-links=/home/support/app_depen/ -r requirements.txt
I am getting the below error
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))
I tried changing the permission like below. But still getting the same error
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
Can someone let me know what is going wrong?
Upvotes: 2
Views: 5992
Reputation: 6872
Putting the --find-links
inside the requirements.txt
like below and then executing sudo pip install -U -r requirements.txt
worked for me.
--no-index
--find-links /home/support/app_depen
retrying==1.3.3
six==1.11.0
Upvotes: 3