I want to install package MetaTrader5 on my Linux [Fedora], but this package is supported only for Windows.
And my question is: Is it possible to install Windows Python packages on Linux? and after installation import in my python file?
My Solution
- install
wine(learn more about wine) - download python for windows, than install with
wine <path to .exe> wine pip install MetaTrader5or another windows only library- (example) create virtual enviroment
wine venv <name project>and select - than import library to file, install package [3] in your virtual enviroment and you can you use it.
- run with
wine python <file.py>
you can install
wineto deal with the windows installer files in your fedora.as per the doc, you can run the following comands one by one to install wine:
sudo dnf clean all && sudo dnf updatednf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/32/winehq.reposudo dnf install winehq-stableafter that, to confirm the installation: run
wine --version, this should be executed without any error.lastly, dowmload the
mt5setup.exeand open it withwine.also, have a look at this answer: https://stackoverflow.com/a/44031808/10918344
hope you find it helpful