peeter123 / digikey-api

Python module for the Digikey PartSearch API
GNU General Public License v3.0
85 stars 35 forks source link

'digikey' is not a package #34

Open dudomatik opened 1 year ago

dudomatik commented 1 year ago

Hi,

I installed the package with pip in a conda environment. It is visible in anaconda navigator and present in the envirnment directory. With both PyCharm and VSCode I get this message every time i try to run a script that imports digikey:

from digikey.v3.productinformation import KeywordSearchRequest ModuleNotFoundError: No module named 'digikey.v3'; 'digikey' is not a package

I am running the example from the readme. This is probably something easy I am overlooking. Can you help me?

Thanks a lot

eeintech commented 1 year ago

Hello @dudomatik

You simply forgot to install the package: https://github.com/peeter123/digikey-api#install

pip install digikey-api
dudomatik commented 1 year ago

Hi @eeintech,

No, thats not the issue. I have installed the package as I mentioned in the first sentence. It doesn't matter in which environment I install it, it always gives me this error.

eeintech commented 1 year ago

The only way I can reproduce your issue is not having the package installed in the environment I'm using so I'm not sure what is happening on your machine :thinking:

elmo2k3 commented 1 year ago

Hi,

same issue here. Neither pip install digikey-api as user nor as root solved the issue. Using python3.10.7 with Ubuntu 22.10

arks-public commented 1 year ago

@dudomatik @elmo2k3

We had the same problem because our script was named digikey.py.

Renaming the script solved our issue.

elmo2k3 commented 1 year ago

Thanks a lot, that fixed this issue for me!