I have imported the Binance package. I don't understand why it is not working. Can someone please point out what is wrong? This is my first time using an API and importing the necessary files.
from binance.client import Client
from binance.enums import *
import apiKey
client = Client(apiKey.apiKey ,apiKey.apiSecurity)
Error message:
Traceback (most recent call last):
File "BinanceTrader.py", line 1, in <module>
from binance.client import Client
ImportError: No module named binance.client
Are you sure that you've installed package python-binance
?
If not try this pip install python-binance
For more securable and comfortable method is virtual environment
. You should look at https://docs.python.org/3/tutorial/venv.html
cd <path-your-project-root-folder>
python -m venv env
source env/bin/activate
(Linux or MacOS) or .\env\Scripts\activate
(Windows)pip install python-binance
pip freeze > requirements.txt