Python Forum
Can't import anything - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Can't import anything (/thread-31862.html)



Can't import anything - thecoltster1 - Jan-07-2021

Hey guys I'm trying to get some basic modules to import into python 3.7. I've done the pip3 installs for keyboard and also pyautogui but when I try to run my program in Visual Studio I get a File No module named 'keyboard'
Stack trace:
> File "C:\Users\Colter\source\repos\PythonApplication6\PythonApplication6\PythonApplication6.py", line 1, in <module>
> import keyboard
Loaded '__main__'
Loaded 'runpy'
I've already installed all of these modules successfully in the console. I'm running Windows 10.
Really just pulling my hair out at this point. I'd like to use Python for a project I have going but I cant even get past the first line import.

I'd like to write the program with Python, the language I'm most familiar with but cant even get past the import. Starting to really pull my hair out. You'd think this would be easy with Python but clearly it's a nightmare. Would rather not write the program in C# if I can help it.


RE: Can't import anything - snippsat - Jan-07-2021

For Visual Studio look at manage Python environments in Visual Studio then point to your Python 3.7 installation.
Then try run a again.
Visual Studio is used bye few in the Python community,most use VS Code that's more geared against Python.
VS Code from start



RE: Can't import anything - thecoltster1 - Jan-07-2021

Wow, I think this worked.


RE: Can't import anything - thecoltster1 - Jan-07-2021

Seems like I wasn't able to import any packages from the 64 Bit version.


RE: Can't import anything - Larz60+ - Jan-07-2021

As snippsat suggested, you should look at VSCode. He also has an installation tutorial which will get you set up for python here VSCode from Start