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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -