简体   繁体   中英

How to install all the dependencies with pip?

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"?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM