1

I'm trying to use heroku for a telegram bot with Python. Everything is going fine except I can't install MetaTrader5 module. when I type git push heroku master command, the answer in PowerShell is:

Enumerating objects: 59, done.
Counting objects: 100% (59/59), done.
Delta compression using up to 4 threads
Compressing objects: 100% (50/50), done.
Writing objects: 100% (59/59), 417.63 KiB | 5.42 MiB/s, done.
Total 59 (delta 19), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing python-3.7.6
remote: -----> Installing pip
remote: -----> Installing SQLite3
remote: Sqlite3 successfully installed.
remote: -----> Installing requirements with pip
remote:        Collecting certifi==2019.11.28
remote:          Downloading certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
remote:        Collecting chardet==3.0.4
remote:          Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
remote:        Collecting idna==2.9
remote:          Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
remote:        Collecting int-date==0.1.8
remote:          Downloading int_date-0.1.8-py2.py3-none-any.whl (5.0 kB)
remote:        ERROR: Could not find a version that satisfies the requirement MetaTrader5==5.0.24 (from -r /tmp/build_4e6218f160af939bdbff3e12742a3458/requirements.txt (line 5)) (from versions: none)
remote:        ERROR: No matching distribution found for MetaTrader5==5.0.24 (from -r /tmp/build_4e6218f160af939bdbff3e12742a3458/requirements.txt (line 5))
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to telegram-bot-2567.
remote:
To https://git.heroku.com/telegram-bot-2567.git
 ! [remote rejected] master -> master (pre-receive hook declined)

In my requirements text I have MetaTrader5==5.0.24. I'm already using this module in my own PC but I can't use it on heroku. Is there any solution for it?

colidyre
  • 4,170
  • 12
  • 37
  • 53
ARASH
  • 23
  • 1
  • 3
  • edit your requirements.txt and remove `MetaTrader5` from `MetaTrader5==5.0.24`. (This is only temporary to see if it would install it.) Also check which Python version you are using locally (`python -V`) and match Heroku's (Python 3.7.6) with your local one (given Heroku still supports that Python). – Tin Nguyen Mar 02 '20 at 06:52
  • My python version is 3.7.6 and I think it's supported by heroku, every other module are installed except for metatrader, i tried it without that ==version but the error is still the same. I don't know why it can't install metatrader and I'm looking for a solution – ARASH Mar 02 '20 at 15:07

1 Answers1

0

The heroku machine your are trying to install the MetaTrader5 package is linux based. This package (plus MetaTrader5 Terminal client) is only available for Windows, unless you use Wine on linux.

I was getting the same error until I installed the package in a windows environment directly (Using CMD).

Edison
  • 870
  • 1
  • 13
  • 28