I've tried every thing, at last I reinstated windows and it solved.
pip install wheel
I had a same problem. Based on your file named forex.py
, I assume you are trying to follow these tutorials from:
In my case, I solved with pip install wheel
in pipenv virtual environment.
Explanation:
What is the error: Because the IbPy2 is written in Python2 and it's not running on proper Python version. Please read this answer for detail. Python 2 and Python 3.
Why does it occur: When you create a virtual environment with pipenv
, there is no wheel
installed. Pipenv installs without wheel
and the message is like this: Using legacy 'setup.py install' for IbPy2, since package 'wheel' is not installed.
And then it was recognized as the code written in Python2.
How to solve: Install wheel
first with pip install wheel
. And then install IbPy2
with pip install IbPy2
, then it will be properly installed and recognized as Python3 code. So you will not see the Python2 syntax error anymore.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.