Pycharm cannot import the package written by itself and the project file is not displayed in the Project column

Preface: Problem 1 is the inability to import the package you wrote, and problem 2 is that the project file is not displayed in the Project column. The project file is not displayed in the Project column and can be seen directly behind.

1.pycharm cannot import packages written by itself

1.1. First check whether the path is correct and whether the file name and function name are typographically correct.

1.2. If there is no problem with the above, I accidentally found a method

1.2.1 Click the root directory, then right-click, select Make Directory as at the bottom, and then select Excluded (Figure 1)

1.2.2 At this time, the folder is gone (Figure 2).

1.2.3 Go to the settings to find Project Structure and delete the X next to Excluded Folders. Apply and OK again, then everything will be fine (Picture 3)

1.2.4 At this time, you will find that the package that was previously marked red is now ready.

                                            figure 1

figure 2

image 3

(Source of Figure 3:The created (or imported) project file is not displayed in the Project column in Pycharm - CSDN Blog)

2. Project files are not displayed in the Project column

Go to the settings to find Project Structure and delete the X next to Excluded Folders. Once the application is OK, it will be fine

Guess you like

Origin blog.csdn.net/qq_46073783/article/details/135012092