Is there a project file support like npm/package.json for Python's pip?

拟墨画扇 提交于 2019-12-09 14:04:13

问题


I just started working on a project where I needed to install a lot of dependencies via pip. The instructions were to do everything manually.

I've used nodejs and maven before where this process is automated and the dependencies are isolated between projects. For example in node I can configure everything in package.json and just run npm install ik my project directory.

Is there something similar for pip?


回答1:


Check out anaconda. You can create lists of dependencies/packages and pass them to conda. Conda has most packages already, and will have everything soon. You can run pip through anaconda in case anaconda doesn't have the package you're looking for. Anaconda is great for both package and python version/environment management. Conda is the future!




回答2:


One other way is to do...

easy_install `cat requirements.txt` 

This may be useful as some of the packages cannot be found in pip.



来源:https://stackoverflow.com/questions/26977128/is-there-a-project-file-support-like-npm-package-json-for-pythons-pip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!