9

I am trying to install a python package MetaTrader5 using the command

python3 -m pip install MetaTrader5

and I have even tried

pip install MetaTrader5

But it throws the following error

ERROR: Could not find a version that satisfies the requirement MetaTrader5 (from versions: none)
ERROR: No matching distribution found for MetaTrader5

I am using Ubuntu 16.04.6 Python 3.6.10

can someone help with this?

Fashil
  • 175
  • 2
  • 8

7 Answers7

2

I have a mac. On it I have conda installed on MacOS. In addition I have a virtual machine running windows and I have also installed conda on Windows. I could install MetaTrader5 package using pip on the virtual machine but not on MacOS.

Ben2209
  • 1,071
  • 4
  • 11
  • 24
2

If you look at Pypy and view the wheel files, you will see that all the builds are for Windows. pip is refusing to install because it can't find a Mac or Linux version.

https://pypi.org/project/MetaTrader5/5.0.37/#files

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/32262831) – n4321d Jul 20 '22 at 16:46
1

According to this Youtube video, MetaTrader5 currently doesn't support Ubuntu. It's only available on Windows.

Nicholas Smith
  • 674
  • 1
  • 13
  • 27
  • 2
    MetaTrader5 is also a python package to interface with Metatrader 5 terminal. It is possible to run the terminal under Wine in Linux but the package is not recognised under Linux unfortunately... – Andy Thompson Jul 09 '21 at 17:53
  • So does that mean there is no version available for MacOS either? – Roger J Bos CFA Jul 10 '22 at 21:45
0

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.

gregn3
  • 1,728
  • 2
  • 19
  • 27
0

I having been trying to install the MT5 on my mint laptop but still not working but was able to run my MT5 python script through the MT5 IDE.

To use Python through the MT5 IDE, follow these steps:

Open the MetaTrader 5 app on your laptop or desktop. Click on the 'IDE' button from the standard toolbar. In the MT5 IDE, click on 'Create New Document.' From the pop-up window, select 'Python Script' and follow the prompt. I hope this helps someone!

Edem Robin
  • 43
  • 5
-1

Download python version 3.10.0 then try installing metatrader5.

here the link: https://www.python.org/downloads/release/python-3100/

  • 1
    Care to explain why this would work? Did you found out that it doesn't work with other versions of Python? (I can't image that, but I'm not familiar with the MataTrader5 module.) And on Ubuntu, Python is generally not installed by downloading it from the Python website. Please provide additional details on why/how this solves the problem. – wovano Nov 15 '22 at 09:36
-1

Metatrader 5 for Python, only work in exact versions:

  • Install one of version below to MT5 works.

Python Versions for Metatrader5

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 25 '22 at 14:33