0

Getting ModuleNotFoundError for recently installed module. There are a lot of similar topics in google, however tips from there (use python3 -m pip instead of pip or use virtual env python3 -m venv) didn’t help me. I also tried both with root and non-root user. Error is always the same. My OS is Debian 12.8 (fresh installation, only single python binary) and python version is 3.11. Any help is appreciated.

term@taz:~$ python3 -m pip install --break-system-packages okx.Trade Requirement already satisfied: okx.Trade in /usr/local/lib/python3.11/dist-packages (1.0.2) Requirement already satisfied: candlelite in /usr/local/lib/python3.11/dist-packages (from okx.Trade) (1.0.17) Requirement already satisfied: paux>=1.0.5 in /usr/local/lib/python3.11/dist-packages (from okx.Trade) (1.0.14) Requirement already satisfied: okx>=1.0.7 in /usr/local/lib/python3.11/dist-packages (from okx.Trade) (2.1.1) Requirement already satisfied: okx-candle>=1.0.5 in /usr/local/lib/python3.11/dist-packages (from okx.Trade) (2.0.1) Requirement already satisfied: urllib3 in /usr/lib/python3/dist-packages (from okx>=1.0.7->okx.Trade) (1.26.12) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from okx>=1.0.7->okx.Trade) (2.28.1) Requirement already satisfied: pandas in /usr/local/lib/python3.11/dist-packages (from okx>=1.0.7->okx.Trade) (2.2.3) Requirement already satisfied: numpy in /usr/local/lib/python3.11/dist-packages (from okx>=1.0.7->okx.Trade) (2.2.1) Requirement already satisfied: pendulum in /usr/local/lib/python3.11/dist-packages (from okx-candle>=1.0.5->okx.Trade) (3.0.0) Requirement already satisfied: redis in /usr/local/lib/python3.11/dist-packages (from paux>=1.0.5->okx.Trade) (5.2.1) Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from pandas->okx>=1.0.7->okx.Trade) (2.9.0.post0) Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.11/dist-packages (from pandas->okx>=1.0.7->okx.Trade) (2024.2) Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.11/dist-packages (from pandas->okx>=1.0.7->okx.Trade) (2024.2) Requirement already satisfied: time-machine>=2.6.0 in /usr/local/lib/python3.11/dist-packages (from pendulum->okx-candle>=1.0.5->okx.Trade) (2.16.0) Requirement already satisfied: async-timeout>=4.0.3 in /usr/local/lib/python3.11/dist-packages (from redis->paux>=1.0.5->okx.Trade) (5.0.1) Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.2->pandas->okx>=1.0.7->okx.Trade) (1.16.0) term@taz:~$ python3 -c 'import okx.Trade' Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'okx.Trade' 
4
  • Thanks, that helps. This seems like a pure python issue, so I'm not sure how on topic it is here, but don't you want something like from okx import Trade? What documentation are you following? What told you to try import okx.Trade? Commented Jan 3 at 16:47
  • @terdon I'm following okex API docs https://www.okx.com/docs-v5/en/?python#order-book-trading-trade-post-place-order Commented Jan 3 at 16:53
  • 1
    Fair enough, that does seem to be what they suggest. Still, I suspect you would get better answers over at Stack Overflow since this really isn't about Linux or Unix at all. Commented Jan 3 at 16:57
  • Whether the question remains here or is moved over to Stack Overflow, include whether or not the directory to which okx was installed is in your Python path and whether or not you have access to the directory and its contents. Commented Jan 3 at 21:40

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.