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

 
add this folder to the PATH, too, if running from cmd
 
Maxim Dmitrievsky:
add this folder to the PATH, too, if you run it from cmd

I specified ("1") when installing

Add Python 3.7 to PATH

Or is that not enough?

 
Vladimir Karputov:

Using thepython command linemetatrader5-test.py doesn't work. Butpip install MetaTrader5 via command line works.

does the black cmd window appear? - If not, then the .py extension is not attached.

I have python scripts in Vin10 with python icon, either execute in IDE or click and in cmd - command line, everything will be executed


WZZ: check paths in the environment, a trick - if the path is only prescribed, then restart cmd - then the path will see after restarting

 
Igor Makanu:

does the black cmd window appear? - if not, the .py extension is not attached

I have python scripts in Win10 with python icon, either run in IDE or click and in cmd - command line, everything will run

I have Windows 10 and run it through

pip install matplotlib

 

Are the icons the same as mine?


I clicked the .py script and everything started working on the command line

 
Vladimir Karputov:

I specified ("1") when installing

Or is this not enough?

no, this is only up to the interpreter, you open a file in cmd without a path, how will it find it

and create a path to the file, i.e. a folder where it is located

 
Maxim Dmitrievsky:

no, this is only up to the interpreter, you open a file in cmd without a path, how will it find it

and create a path to the file, i.e. a folder where it lies.

Put the path in the PATH. The file in the folder is associated with Python (can be seen by the icon).

It stilldoesn't work through the Execute menu with thepython commandmetatrader5-test.py.

 
Vladimir Karputov:

I have written the path in the PATH. The file in the folder is associated with Python (can be seen by the icon).

Still thepython metatrader5-test.py commanddoes not work via Run menu.

if you are an admin then the bottom environment variable field "system variables" which, do the same

 
Igor Makanu:

Are the icons the same as mine?


I just clicked the .py script and everything started working on the command line.

Yeah, the icons are the same. Everything runs when you click it.

 
Maxim Dmitrievsky:

If you are an admin, the bottom environment variable field, do the same

So I gave up. Cleared the changes from Path.

I will just run the scripts by clicking from the folder.

Reason: