Module pyaxidraw not found even though it's in site-packages

375 Views Asked by At

I tried to connect to my pen plotter using package pyaxidraw. I did install it successfully, upgraded as it says on their site by using commands:

python -m pip install https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip
python -m pip install https://cdn.evilmadscientist.com/dl/ad/public/AxiDraw_API.zip --upgrade --upgrade-strategy eager

It is visible in site-packages folder, the files are there. However, I cannot import it in my scripts - I get ModuleNotFoundError: No module named 'pyaxidraw'.

Path to site-packages is added to Path variable, as are many other paths to python. Tried installing it through python setup.py install and pip install . and nothing changed.

I also tried running the code below and it does work fine through terminal:

python -c "from pyaxidraw import axidraw; ad = axidraw.AxiDraw(); print(type(ad)); ad.interactive();  ad.connect(); ad.moveto(3, 5); ad.lineto(0, 0); ad.disconnect();"  

this makes my plotter move and plot just fine while in code it's still underlined in red because I can't import it.

But running the same code with "python3" instead of "python" in terminal gives me ModuleNotFoundError: No module named 'axidrawinternal'. It is said to work with Python 3.6 so I don't get what is happening.

How do I make python/Pycharm see this module so I can write scripts with it?

0

There are 0 best solutions below