2

I am getting the error: "ModuleNotFoundError: No module named 'kucoin.client'; 'kucoin' is not a package" when running the code underneath. I did pip install like in the documentation here: hhttps://python-kucoin.readthedocs.io/en/latest/ . What is going wrong?

import api_KuCoin
Xkey = api_KuCoin.Pkey
Ykey = api_KuCoin.Skey
Zkey = api_KuCoin.Dkey
client = Client(api_key=Xkey, api_secret=Ykey, api_passphrase=Zkey)```

Traceback (most recent call last):
File "d:\Crypto\kucooin.py", line 1, in <module>  
from kucoin.client import Client
ModuleNotFoundError: No module named 'kucoin.client'


1 Answers1

1

This error: ModuleNotFoundError: No module named 'kucoin.client'; 'kucoin' is not a package may also occur if you have named the main program file you created as kucoin.py and try to run it as python kucoin.py or another file has the name kucoin.py in the same folder from which you run your program. Python will consider your program file as a module and try to find something in it that is naturally not in it. About where Python is looking for modules, see sys.path.

In this case, rename your program file so that its name does not equal with the name of the imported module.

kirogasa
  • 627
  • 5
  • 19