0

I run Python code in Jupyter-lab, I get a message:

ModuleNotFoundError: No module named 'pytdx.crawler'; 'pytdx' is not a package.

However pytdx is on my computer, in the python310 directory, when I run !pip show pytdx in jupyter lab, it shows that pytdx exists. When I run the same Python code in Python 3.10(64-bit), I don't get this error message. What is wrong, how can I fix it?

when I run

import sys print(sys.version)

in Jupyter-lab, I get

3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Steven
  • 24,410
  • 42
  • 108
  • 130
  • Are you sure that's the Python installation that Jupyter is using? How do you know? – Tim Roberts Jun 06 '23 at 00:39
  • 1
    Either you're not running the same python binary as the one associated with pytdx, or your script is named pytdx or something else is the issue with your Jupyter-lab env. – ewokx Jun 06 '23 at 00:39
  • Yes, one of my scripts is named pytdx, thank you. – Steven Jun 06 '23 at 00:52

0 Answers0