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
Post a Comment