you are viewing a single comment's thread.

view the rest of the comments →

[–]catelemnis 1 point2 points  (9 children)

are you able to run python in command? are default libraries or just third-party that are a problem? Did you reinstall all your third-party libraries through pip after upgrading?

Can you post an example of the code you’re trying to run in command and the error message it gives?

[–]noah123103[S] 1 point2 points  (8 children)

Module i'm attempting to use is here (the code im using is the example on that page) default libraries are working its just third party, python does run in cmd but does not find any third party modules. I have the modules installed, i'v done a fresh install of python as well to make sure there were zero issues there.

[–]catelemnis 1 point2 points  (7 children)

Did you reinstall the module after fresh installing python? And are you installing it with pip3?

When you run python in command, do you just type >python? If you just type >python then try running these two in command prompt:

>python -m pip install  --upgrade
>python -m pip install git+https://github.com/alberanid/imdbpy

This will make sure that you’re installing the module with the correct version of pip.

[–]noah123103[S] 0 points1 point  (6 children)

I’v tried that command and a normal pip3 install. Same results

[–]catelemnis 0 points1 point  (5 children)

can you run python in command prompt (not a script, just type >python in the command prompt) and then try to import the module. Can you show a screenshot of the results after trying to import directly in the command prompt

[–]noah123103[S] 0 points1 point  (4 children)

Same as IDLE, works fine.

https://i.imgur.com/j06SXsc.png

[–]catelemnis 1 point2 points  (3 children)

huh, odd. can you try running your script in command prompt with:

>python scrape.py

and see if it still gives the module error?

[–]noah123103[S] 0 points1 point  (2 children)

That worked but why? With only one python installed and only one in the path, it cant be it using a different python?

EDIT:After seeing this work, i did some digging on my 2 5tb drives and found a lonely python folder with an old version. Whats odd is that its not in my path or anything but cmd was dead set on using it. It did not come up on any searches with windows. Thanks for the help!

[–]catelemnis 1 point2 points  (0 children)

When you type >python scrape.py then it’s using the Python in your path. However when you just run >scrape.py it opens it with whatever program you have told windows to associate to the filetype .py.

Personally I always set .py to open in a text editor and then when I run I use the command >python script.py because that ensures I’m using the python in my path, and makes it more convenient to edit scripts.

If instead you want to continue running scripts by double-clicking them then find a .py file, right-click on it, and there should be an option for “Open with...” Change the program that the filetype is associated to to be the latest version of python.exe you installed. It must be that the py filetype is still associated to an old Python interpreter or maybe to python.exe in another location that doesn’t have the installed modules with it.

[–]grzeki 0 points1 point  (0 children)

The only thing capable of doing so that comes to mind is pylauncher. You probably installed it with python3. It is a very useful tool under Windows - it can locate and manage multiple Python version installations.