MetaTrader 5 Python User Group - how to use Python in Metatrader - page 32

 
Renat Fatkhullin:

You have Python 3.8, put better 3.7.6, as many libraries are not yet ready for 3.8 anyway

1) From the command line, check the script.

2) Make sure the path to Python is in the PATH

3) Make sure there is only one copy of Python and no conflicts with other versions

4) Make sure the path to that single copy of Python is in the editor settings

Removed 3.8, installed 3.7.6. There is only one version. Paths in PATH are in two files, checked path in editor.


Still:


 
Vladimir Karputov:

Removed 3.8, installed 3.7.6. There is only one version. Paths in PATH are written in two files, checked path in editor.
Still:

Maybe in the python path setting, you need to set the path to AppData.
I have it installed in this folder by default.
You have it set to E:\Programs\Python37


 
Roman:

Maybe in the python path setting, you need to set the path to AppData.
I have it installed in that folder by default.
You have it set to E:\Programs\Python37


I have this path, so I put it exactly in the'E:\Programs\Python37' folder

 
Vladimir Karputov:

I have this path, so I put it exactly in the'E:\Programs\Python37' folder

Installed everything by default, no problem


 
Is python included in the visual studio?

Because of the zoo of pythons, deployed indirectly or automatically by different systems, you can easily get libraries installed in another python copy and then trying to run other copies.

Sort out the pythons, please. Those who move to python must be prepared to spend the rest of their lives struggling with libraries, dependencies and incompatibilities.

This is the fate of a pythonist - to build an environment of libraries and pray that some library update will not mess up another unknown number of libraries.
 
Renat Fatkhullin:
Is python enabled in Visual Studio?

Because of the zoo of pythons deployed indirectly or automatically by different systems, it is easy to get libraries installed in another python copy and then try to run other copies.

Sort out the pythons, please. Those who move to python must be prepared to spend the rest of their lives battling libraries, dependencies, and incompatibilities.

This is the fate of a pythonist - to build an environment of libraries and pray that some library update doesn't mess up another unknown number of libraries.

Visual studio removed. Pycharm removed. Only python is left. I got the error right here:


 

Maybe Python is downloaded and defaulted to 32 bit?

Better to install via the install button in the settings - it will definitely give you the 64 bit version.

 
Renat Fatkhullin:
Maybe the default python is downloaded and installed 32 bit?

Nope. x64:



Except I have an Intel CORE i3 processor.


After uninstalling studio in editor two fields are empty in settings - is this normal?


Or is it necessary to install LLVM?

 

Seems to need some kind of file (DLL?) '.C'.

Since in Python37\Lib\site-packages\MetaTrader5\__init__.py it frowns at the line

from .C import *


error message:

>>> 
==== RESTART: E:\Programs\Python37\Lib\site-packages\MetaTrader5\__init__.py ===
Traceback (most recent call last):
  File "E:\Programs\Python37\Lib\site-packages\MetaTrader5\__init__.py", line 35, in <module>
    from .C import *
ImportError: attempted relative import with no known parent package
>>> 
 
Roman :

Installed everything by default, no problems


How do you change the MetaEditor skin? Please let me know.