SoFunction
Updated on 2024-11-18

Pycharm failed to install third-party libraries solution

I. Error message: [file] [Default Settint] --- Project Interpreter

Clicking + searching suds installation module reports an error

Solution: Find lines 192 and 109 of the C:\Program Files\JetBrains\PyCharm 2017.2.3\helpers\packaging_tool.py file according to the instructions above.

Modify the do_install and do_uninstall functions to the following format

def do_install(pkgs):
  try:
    try:
      from pip._internal import main
    except Exception:
      from pip import main
    
  except ImportError:
    error_no_pip()
  return main(['install'] + pkgs)
def do_uninstall(pkgs):
  try:
    try:
      from pip._internal import main
    except Exception:
      from pip import main
  except ImportError:
    error_no_pip()
  return main(['uninstall', '-y'] + pkgs)

Generally up to this point the problem can be solved, if it is not solved, please continue to read below

Second, followed by the following error: NameError: name 'pip' is not defined

Solution:

The above problem is caused by the incomplete modification of the first time: change the return content of the do_install and do_uninstall functions by removing the pip

Third, finally appeared again: install suds prompt ModuleNotFoundError: No module named 'client'

Solution:

There is no module called client. You need to install client first, then suds.

pip install client

pip install suds

This is the whole content of this article.