A little problem with the initial installation of python (pycharm cannot install third-party modules, pip cannot be upgraded, etc.)

I installed pyCharm today to get familiar with the environment. The installation went smoothly. I found an activation code or something, but when I wanted to import a third-party module, there was a problem. The problem is as shown in the figure below.

For a newcomer, it is rather sad. The description means that the module pip does not have a main attribute. The description is very clear, but. . . How to solve it. . .

Fortunately, there is an article on the Internet about this issue. . https://www.cnblogs.com/Fordestiny/p/8901100.html

Find the helpers/packaging_tool.py file in the installation directory and modify it according to the above steps. . It's solved but I don't understand why this problem occurs


Later, I wanted to install an aiohttp module in the command line, and there was a problem again, and the prompt said 

Traceback (most recent call last):
  File "/bin/pip3", line 7, in <module>
    from pip import main
ModuleNotFoundError: No module named 'pip'

It means that there is no pip, so I searched online and found a solution


Beginner python take it slow

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324727987&siteId=291194637