PyCharm Cannot start the IDE with cloning

Answered

I always used Spyder for my Python scripts, but I switcheed to PyCharm now and installed on my Windows 11 PC (version 2024.3.4). First, I set PyCharm up in the way I want it to work and when I create a new project everything works like it should (also the IDE).

I made some Python scripts earlier in Spyder and committed those to a repo on GitLab. Now I want to clone this repo in PyCharm, but I get the following error:

PyCharm starts normal every time and this only occurs when I want to clone a repo or open a cloned repo. The repo is cloned properly and the files are downloaded at the location I specify, it is just that I get this error. When I click “OK”, the error comes back. When I click “OK” 50 times, then it comes back 50 times.

Does anyone know why this error occurs and how to fix this? I have no idea what the meaning is. The suggested URL is not helping. I do not believe that reinstalling the IDE is the solution here, since the IDE does work properly when I create a new project.

0
5 comments

Could you please provide us with the zipped log directory  - https://intellij-support.jetbrains.com/hc/en-us/articles/206544519

You can upload to https://uploads.jetbrains.com/ and share it's upload ID

0

I cannot add the entire file, since it on an internal system. However, I did find the issue in the log files. Now I only need a solution for that. 

2025-03-20 18:23:38,227 [   7704]   INFO - #c.j.p.p.p.PypiPackageCache - Updating PyPI packages cache
2025-03-20 18:23:38,227 [   7704]   INFO - #c.j.p.p.p.PypiPackageCache - Cache file does not exist, reading packages from PyPI
2025-03-20 18:23:38,227 [   7704]   INFO - #c.j.p.p.p.PypiPackageCache - Loading python packages from PyPi
2025-03-20 18:23:38,242 [   7719]   INFO - #c.j.p.p.PyPIPackageUtil - Fetching index of all packages available on https://pypi.org/simple/
2025-03-20 18:23:38,258 [   7735] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Unhandled exception in [ComponentManager(ProjectImpl@876316969), com.intellij.codeWithMe.ClientIdContextElementPrecursor@5f914c22, CoroutineName(com.jetbrains.python.packaging.toolwindow.PyPackagingToolWindowService), Dispatchers.IO]
java.net.UnknownHostException: pypi.org

So it cannot fetch anything from pypi.org/simple which is logical since the laptop is only connected to the intranet. For this, we have a server called company/repo/pypi/simple where all the packages are.

I have pip.ini located in C:\\Users\username to make sure I can use pip. In this pip.ini, the server for pypi has been added and this also works. When in PyCharm I go to Python Packages however, this error pops up. I add the URL to the internal repo in Manage Repositories, but the error still pops up and looking at the log files: its still looking for pypi.org/simple instead of company/repo/pypi/simple.

How to make sure it will look for company/repo/pypi/simple?

0

This occurs because there is a usability problem where is not  possible to disable the Pypi repository from the Python packages - https://youtrack.jetbrains.com/issue/PY-53867/Can-not-find-how-to-disable-the-PyPI-repository-in-Python-Packages

0

If you're having trouble starting PyCharm after cloning a repository, it's like trying to prepare a meal without the right ingredients! First, make sure Python is properly installed and configured in PyCharm’s interpreter settings (File > Settings > Python Interpreter). Try cloning the repository directly in PyCharm via File > New Project from Version Control to set everything up smoothly, like gathering your kitchen tools. Check for any missing dependencies by running pip install -r requirements.txt in the terminal, similar to checking if you have all the ingredients. Ensure you're using the latest version of PyCharm, and if the issue persists, check the IDE logs under Help > Show Log in Explorer/Finder for specific errors—it's like troubleshooting your recipe. If all else fails, reinstalling PyCharm might just be the “refreshing ingredient” needed to fix the problem!

0

Had the same issue — deleting the .idea folder and reconfiguring the interpreter fixed it for me. Seems PyCharm struggles when cloned projects carry old settings

0

Please sign in to leave a comment.