Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't import anything
#1
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.
Reply
#2
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
Reply
#3
Wow, I think this worked.
Reply
#4
Seems like I wasn't able to import any packages from the 64 Bit version.
Reply
#5
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
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020