0

I'm using Python 3.6 on Windows 7. I have a script that uses standard python packages. The script run fine from IDLE. It used to run fine from Windows command too, but not anymore. I don't know why. It complains about missing package like:

, line 4, in <module>
    import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'

The path looks ok (I've added all path found from IDLE / Path Browser):

PATH=C:\Users\olivier\AppData\Local\Programs\Python\Python36\lib\site-packages;C:\Users\olivier\AppData\Local\Programs\Python\Python36\Lib;C:\Users\olivier\AppData\Local\Programs\Python\Python36\DLLs;C:\Users\olivier\AppData\Local\Programs\Python\Python36\python36.zip;C:\Users\olivier\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\olivier\AppData\Local\Programs\Python\Python36\;C:\Users\olivier\AppData\Local\GitHubDesktop\bin

Any idea?

Thanks

Olivier
  • 15
  • 1
  • 6

2 Answers2

1

I had the same problems. Did you try to install it through pip and did you try to install on the strict path by using pip install --target="..." for e.g "pip install --target=C:\U2\UV\python\Lib\site-packages geopy" and pasting it in python console?

Also look at this post: Install a module using pip for specific python version

0

These two points can help you to solve the problem as per my knowledge. Are you using two Python versions? Check the Environmental Variables and if everything is fine there, it's better to uninstall and reinstall it again. use pip for installing and uninstalling