", line 198, in \_run_module_as_main File "\", line 88, in _run_code File "C:\" /> ", line 198, in \_run_module_as_main File "\", line 88, in _run_code File "C:\" /> ", line 198, in \_run_module_as_main File "\", line 88, in _run_code File "C:\"/>

Not able to add the libraries in the Pycharm

95 views Asked by At
Traceback (most recent call last):
File "\<frozen runpy\>", line 198, in \_run_module_as_main
File "\<frozen runpy\>", line 88, in _run_code
File "C:\\Program Files\\JetBrains\\PyCharm Community Edition 2022.1.4\\plugins\\python-ce\\helpers\\pip-20.3.4-py2.py3-none-any.whl\\pip_main_.py", line 23, in \<module\>
File "C:\\Program Files\\JetBrains\\PyCharm Community Edition 2022.1.4\\plugins\\python-ce\\helpers\\pip-20.3.4-py2.py3-none-any.whl\\pip_internal\\cli\\main.py", line 10, in \<module\>
File "C:\\Program Files\\JetBrains\\PyCharm Community Edition 2022.1.4\\plugins\\python-ce\\helpers\\pip-20.3.4-py2.py3-none-any.whl\\pip_internal\\cli\\autocompletion.py", line 9, in \<module\>
File "C:\\Program Files\\JetBrains\\PyCharm Community Edition 2022.1.4\\plugins\\python-ce\\helpers\\pip-20.3.4-py2.py3-none-any.whl\\pip_internal\\cli\\main_parser.py", line 7, in \<module\>
File "C:\\Program Files\\JetBrains\\PyCharm Community Edition 2022.1.4\\plugins\\python-ce\\helpers\\pip-20.3.4-py2.py3-none-any.whl\\pip_internal\\cli\\cmdoptions.py", line 18, in \<module\>
ModuleNotFoundError: No module named 'distutils'

I have tried updating the pip version and updating the python version

2

There are 2 answers

2
AKX On

The Pip 20.3.4 helper wheel bundled with your 2022.1 version of PyCharm is not compatible with your version of Python (since distutils is missing, I'd guess 3.12).

Trying to update your pip by hand won't help because this is the bundled pip.

Update your PyCharm version instead, or downgrade to a Python version supported by it (Python 3.10 had been released at the time of PyCharm 2022.1 being released).

You can also try to install setuptools (which is the library that provides distutils for Python 3.12), but I would recommend updating PyCharm.

0
Bhargav On

I appreciate @AKX for your reply, I have debugged where I am getting stuck. It is with my setup tools not installed. After installing the setup tools everything working.