1

it's ok to use pip install -r requirements.txt directly,however,when i tried to use it in virtualenv,it failed with these errors:

test@te:~$ cd flaskbb/
test@te:~/flaskbb$ 
test@te:~/flaskbb$ source .venv/bin/activate
(.venv)test@te:~/flaskbb$ pip install -r requirements.txt 
Obtaining file:///home/test/flaskbb (from -r requirements.txt (line 50))
  Running setup.py egg_info for package from file:///home/test/flaskbb

    no previously-included directories found matching 'flaskbb/themes/*/node_modules'
    no previously-included directories found matching 'flaskbb/themes/*/.sass-cache'
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    warning: no previously-included files matching '*.py[co]' found anywhere in distribution
Downloading/unpacking alembic==0.9.1 (from -r requirements.txt (line 1))
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement alembic==0.9.1 (from -r requirements.txt (line 1))
No distributions at all found for alembic==0.9.1 (from -r requirements.txt (line 1))
Storing complete log in /home/test/.pip/pip.log
(.venv)test@te:~/flaskbb$

And here is my system:

test@te:~$ uname -ar
Linux te 3.2.0-101-generic #141-Ubuntu SMP Thu Mar 10 21:43:24 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
test@te:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise
test@te:~$ uname -r
3.2.0-101-generic

Thx for help!!!

AsherLi
  • 11
  • 1
  • 4
  • Possible duplicate of [PIP Could not find any downloads that satisfy the requirement SQLAlchemy](https://stackoverflow.com/questions/24101300/pip-could-not-find-any-downloads-that-satisfy-the-requirement-sqlalchemy) – hoefling Nov 24 '17 at 15:05

1 Answers1

6

you can specify the https URL: sudo pip install -r requirements.txt -i https://pypi.python.org/simple

Riad
  • 73
  • 3
  • Here `-i` option point to a repository compliant with PEP 503 (the simple repository API), which could also be the local directory laid out in the same format. – Ayush Vatsyayan Jan 26 '18 at 13:18