path - How to use pip install python packages locally like npm does -


say have project named foo, , and want install requests package locally project. expecting structure similar this:

foo/
|-main.py
|-requirements.txt
|-readme.md
|-python_modules/
|-|-requests
...

and can pip install -r requirments.txt -t ./python_modules/, however, doesn't work because there no __init__.py under python_modules/ programs won't automatically import every packages in python_modules.

on other hand, npm install well.

so question is, how let pip work same npm does?

ps: know there other conventions using virtualenv or pythonbrew, still want ask question.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -