简体   繁体   中英

HEROKU app ModuleNotFoundError: No module named 'numpy'

So I need to run a certain script daily. I know how to do it locally, but to do so I'd have to have my PC opened 24/7.

I thought I could deploy it in an online server and have it there always running. I've tried to use Heroku and so far it's been well except for one thing.

The deployment was ok. No errors given, the requirements.txt is full of modules I need, and the Procfile contains the next line of code (the file is called automatic.py):

web: python3 automatic.py

When I try to execute: heroku run python3 automatic.py it shows me the error telling that Numpy is not installed (but it is in the requirements.txt though).

Any idea on how to solve this?

PS: changing python3 for python isn't the solution because it uses python2 and that gives me other errors related with the version.

Thanks in advance.

Can you check that your requirements.txt is at the root of your projecr like specified in the documentation? https://devcenter.heroku.com/articles/python-pip

You can also use a template docker file for scientific computing with Heroku: https://github.com/heroku-examples/python-miniconda That would be the simplest way to get this working with scipy.

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