How to install all the dependencies with pip?

此生再无相见时 提交于 2020-12-16 04:03:50

问题


I have a NodeJS API and a Python script. I deployed it on Heroku. The API call runs the python scripts.

When I deployed the NodeJS API then type npm install and all works fine but not for python. There is a lot of pip package to install, how can I make this work same as in my local environment?

In short, what is the "One command to install them all"?


回答1:


You should define your requirements in a requirements.txt file and then

pip install -r requirements.txt

will install all at the same time.

You can create it by

pip freeze > requirements.txt

but should include only the packages you really use.



来源:https://stackoverflow.com/questions/63264573/how-to-install-all-the-dependencies-with-pip

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