Fashil
Fashil

Reputation: 185

Could not find a version that satisfies the requirement MetaTrader 5

I am trying to install a Python package, MetaTrader 5, 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:

How can I fix this?

Upvotes: 10

Views: 15068

Answers (8)

Syed Sajjad Askari
Syed Sajjad Askari

Reputation: 61

use mt5 linux

pip install mt5linux

Upvotes: 0

Murilo Ramos Pires
Murilo Ramos Pires

Reputation: 9

MetaTrader 5 for Python only works with certain versions.

Install one of the versions below to make MetaTrader 5 work.

screenshot listing Python versions for MetaTrader 5

Upvotes: -1

user19562646
user19562646

Reputation: 51

If you look at PyPI 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.

Upvotes: 5

Edem Robin
Edem Robin

Reputation: 41

I having been trying to install MetaTrader 5 on my Linux Mint laptop, but still it is not working. But I was able to run my MetaTrader 5 Python script through the MetaTrader 5 IDE.

To use Python through the MetaTrader 5 IDE, follow these steps:

  • Open the MetaTrader 5 application on your laptop or desktop.
  • Click on the 'IDE' button from the standard toolbar.
  • In the MetaTrader 5 IDE, click on 'Create New Document.'
  • From the pop-up window, select 'Python Script' and follow the prompts.

Upvotes: 0

gregn3
gregn3

Reputation: 1774

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, and 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 MetaTrader 5 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 MetaTrader 5 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 MetaTrader 5 terminal successfully (that was also installed with Wine), and all the API functions also work.

Upvotes: 2

Teja Siddani
Teja Siddani

Reputation: 21

Download Python version 3.10.0, and then try installing MetaTrader 5.

Get it from this page.

Upvotes: 1

Ben2209
Ben2209

Reputation: 1121

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 the MetaTrader 5 package using pip on the virtual machine, but not on macOS.

Upvotes: 3

Nicholas Smith
Nicholas Smith

Reputation: 720

According to this YouTube video, MetaTrader 5 currently doesn't support Ubuntu. It's only available on Windows.

Upvotes: 0

Related Questions