user19562646's answer is the correct one.
The package is binary only, and the binaries are for Windows only.
I was able to install the Windows version of Python with wine, and install this package.
Apparently wine emulates Windows 7, but the latest Python version requires Windows 8.1. The last Python version that supports Windows 7 was Python 3.8.10. I tried it with this version, but there was a wine error about an unimplemented feature. (wine: Unimplemented function api-ms-win-crt-runtime-l1-1-0.dll.fetestexcept
)
I have tried it with Python 3.6.8, it seems to work with this one so far.
(Later Python versions that are older than 3.8.10 may work too, but I haven't tried.)
To run the Python 3.6.8 Windows installer with wine:
wine python-3.6.8-amd64.exe
To install the MetaTrader5 package:
wine /PATH_TO_PYTHON_3.6.8/python.exe -m pip install MetaTrader5
To run the app:
wine /PATH_TO_PYTHON_3.6.8/python.exe myapp.py
Initializing the MetaTrader5 module:
I was able to run the MetaTrader5.initialize ()
function successfully without any parameters, but it seemed to fail when called with parameters such as path
. Without any parameters it finds and launches the MetaTrader5 terminal successfully (that was also installed with wine), and all the API functions also work.