Solution of modulenotfounderror in running pychar
You need to load the corresponding module file in pychar. The specific steps are as follows: left click in file, select settings, and select【 python:xxx 】Click [Python interperter] in the toolbar to open the page and select [add] in the toolbar, After the page appears, select [existing environment] to load python.exe File my python.exe The file is in the following location: C: users, administrator, appdata, local, programs, python, python38
Common problems
one python.exe There is no required module file in the file
At this time, you need to use pip to install the corresponding files. The installation steps are as follows:
1. Open CMD
2. Enter the CD in the folder (the following is my path) C:: (users / administrator / appdata / local / programs / Python / python38 / scripts)
3. Start to install the file PIP install flash (take installing flash as an example)
4. Check if the installation is complete, you can use pip to install flash List to determine whether the installed file is in the list
2. “PIP” is not an internal or external command
1. Confirm that “PIP” is not an internal or external command, nor a runnable program or batch file.
2. Solution 1: go to the folder where pip is located, and copy the path
my path is: C:: (users, administrator, appdata, local, programs, python, python38, scripts)
3. Switch the working directory to the path of PIP
CD
4. Execute PIP again, method 1, success!
5. Method 2: add pip to environment variables
right click my computer and select properties
6. Select: Advanced – environment variable
7. Open path to edit, and add the directory path of PIP at the end
8. After confirming the setting of environment variables, method 2 is successful!