Pycharm know about every new project libraries need to reinstall some third-party solutions, and .ideal file

  1. Pychram the new project .idea role folder:

When pycharm as IDE , the automatically generated .deal folder used to store configuration information items. Including version control, history and so on. To put it plainly, .idea folder regardless of whether the normal implementation of the current project, it is only responsible for the changes in the code of conduct a historical record, easy to look back and rehabilitation.

  1. pycharm after new construction issues need to re-import module

Every new project we will import the module case, open the original project, and what difference does it make?

Because of the lack of this .idea file, .idea file contains all the configuration of the project, so the import module is also there. So the key issue is configuration files,

So copy .ideal file to a folder on your

Use to open the file folder found pycharm need to import the module, so the need to put other projects built inside .deal file copy and paste it into this folder, copy and paste reopened after pycharm good. Do not import the package.

 

Solution two :( about pycharm each new project will need to reinstall some third-party library solutions)

  1. Preceded by pycharm the project interpreter in the + to add some bank number, but add the library project only designated use. If you want to use it must be used before the project python interpreter.

Illustration :

This is before the project interpreter, the interpreter of this project is to inherit python interpreter, while installed above you see these libraries, including pip and pygame etc., and then create a new project.

 

 

 

  1. The new project interpreter, not previously installed libraries. Just put it into the project before the interpreter automatically loads the third-party libraries installed before the project .
  2. This can be downloaded third-party libraries before use.

Note: This method relies on pycharm third-party libraries installed in the back, only need to install once, and then each subsequent index reading to the interpreter after the inheritance can be.

Method Two: Adding items used python of site-package path,

This also resolved, why sometimes cmd you can import some libraries, while pycharm not import will burst no module problem, the real problem or environment variables.

Add the environment variable to PYTHONPATH path, add this path: D: \ python3.7 \ Lib \ Site-Package Penalty for

 

 

 

Note: After a lot of information to the library path will install here, so you can find the installation of the library.

Note: The essence of this method is to add a global installed base (by PIP installed)

Method three:

If the library is installed by the pip install site-packages inside, then there can inherit click on it

Opening the interpreter , the Add

 

 

 

To inherit global site-packages tick on it

 Source of guidance:

https://blog.csdn.net/qq_31638535/article/details/80574513?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task

Guess you like

Origin www.cnblogs.com/chenzhijuan-324/p/12465222.html