Stuck 'Scanning Installed Packages'

Answered

Dear all,

 

When I open PyCharm, this task 'Updating Python Interpreter/Scanning Installed Packages' never ends. 

I have tried:

- Uninstalling and reinstalling PyCharm to the latest version (without keeping any settings)

- Running 'conda update --all' to sort out all the packages in the relevant python interpreter. 

- Uninstalling some new packages I had installed to check that none of them is causing the problem. 

 

Please let me know if you have any ideas what might be wrong - many thanks!

 

20 comments
Comment actions Permalink

Hi,

Have you tried File | Invalidate Caches/Restart?

If it doesn't help, please upload your renamed idea.log from Help | Show Log in... to https://uploads.services.jetbrains.com/ and let me know the  name of the file.

0
Comment actions Permalink

I am seeing similar issues (stuck on "Scanning Installed Packages" - it never gets to "Loading Packages List" when I create a new project.

I cannot try "Help | Show Log" or "File | anything" since the interface is non-responsive.

 

0
Comment actions Permalink

Updating Java seemed to fix the problem. Java was stuck trying to update itself automatically, and when I re-installed it, PyCharm seems to work again.

0
Comment actions Permalink

I am having the same problem: scanning installed packages never ends. I tried invalidate caches/restart.

I have just updated to the new 2019.1 version and am still having the problem.

Any clues would be welcomed.

0
Comment actions Permalink

Hey @Gleicher,

Are you using virtual environment (conda, virtualenv) ?

If it's conda, do you use Anaconda installation, or Miniconda, or anything else?

Can you please post screenshots of your project structure and interpreter paths? Both can be accessed from the settings. Interpreter paths is a bit burried: 

0
Comment actions Permalink

Hi, I have the same problem. In my case the text is in the center of the screen and I don't even have access to the toolbar or the project buttons or anything (!!!). I have installed the newest version (2019.1) and I have re-installed Java as mentioned above but without luck. This is so frustrating! 

0
Comment actions Permalink

Update: I opened an older project and I had access to the interpreter which I include below. The package list does not seem able to load after about 20 minutes. 

0
Comment actions Permalink

I have the same problem as @Georsara11, when creating a new project, pycharm stuck in Scanning Installed Packages and it is unusable. This problem appears right after the most recent update. I am using the conda version of python interpreter. 

0
Comment actions Permalink

@andrey - I am using Anaconda (an older version, needs to be updated)

I would never have found the interpreter paths!

That list is kindof random (not things I use often)

 

The project structure (from one of my projects):

 

Thank you!

0
Comment actions Permalink

@Gleicher ,

Have you opened the existing project after updating to 2019.1 ?

Can you please try to create a new project and new interpreter from scratch, will the issue reproduce?

So far we have reports of "very long indexing" times when opening projects created in the older PyCharm versions. Still investigating, therefore I'm asking you to test in a new project.

Also, please try removing and creating again the interpreter in your current project.

0
Comment actions Permalink

@andrey

 

I am using 2019.1.

I tried making a new project. For its interpretter, there were no options (!) so I manually created a "system interpreter" interpreter by picking the python.exe that is in my /anaconda3 folder. (I thought this might be more successful that telling it that I had a conda environment)

And... same problem.

Well, similar problem. The "scanning installed packages" progress bar is up and it says "stopping - scanning installed packages"

Actually - the problem is worse: the interface is non-responsive. I can't click on the menu. I can't even click the close button. It's totally stuck.

I had to use the task manager to kill processes (I killed the Python processes - there were 3 - until the interface became responsive again. Now I have "scanning installed packages" again, but it's a background process).

Interestingly, the project interpreter tells me:

I have been a PyCharm user for a long time. I wonder if there is some old setting which is causing things to get stuck. I've also had Anaconda for a long time. I keep updating.

I am tempted to do a "deep clean" of everything and start over. Is there a recommended way to make sure I clear out everything so I get a really fresh installation? (I guess this also means deleting the project files in the directories)

 

0
Comment actions Permalink

>I am tempted to do a "deep clean" of everything and start over. Is there a recommended way to make sure I clear out everything so I get a really fresh installation? (I >guess this also means deleting the project files in the directories)

No need to clear project files. You can clean the following:

1. PyCharm settings, which can be located according to https://intellij-support.jetbrains.com/hc/en-us/articles/206544519

2. '.idea' directory in your project root

This will make PyCharm start from clean slate, all settings to default.

Then:

1. Open your project directory. PyCharm will create a new '.idea' inside, but will complain about interpreter since we didn't create one yet.

2. Create a new interpreter, in a new Conda environment. Do not select "system interpreter" and point to python.exe in your Anaconda installation, this is incorrect. Either create a new environment, or select "Existing environment" and point to "python.exe" inside that environment directory.

I understand this is cumbersome and one of those "Delete everything and reinstall" advises, but I believe it should help.

0
Comment actions Permalink

@andrey - I did this. I also used it as an opportunity to get a fresh Anaconda install and upgrade to Python 3.7.

When I opened my project, I did not have to do step 2 (create a new interpreter) - it did this automatically for me.

It seems to have gotten past the "scanning installed packages" - it is generating skeletons (which should take a log time, given a fresh python install).

It looks like it finished. Yay! Thank you!

 

0
Comment actions Permalink

I met the same problem when I tried to open a project pulled from git remote, and I could not do any thing expect looking at this page:

It runs forever(Two days at least)! All the menu and button are enable and I can only close it by the task manager!

0
Comment actions Permalink

@924797163

Can you please try "resetting" PyCharm to it's default state using my comment above (https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003055399/comments/360000440799) , and let me know if the issue is reproduced afterwards?

0
Comment actions Permalink

Thank you everyone for all your help. If it's any use to anyone, after trying some solutions above I eventually found that the problem was with my underlying Python distribution, which I uninstalled and reinstalled. This is easier than you might think. Thank you again!

0
Comment actions Permalink

If you use Anaconda, make sure that the path Anaconda/Scripts is not in your Environment Variable.

0
Comment actions Permalink

@andrey

Hi, I unfortunately have the same problem. 

I cleaned out my .idea folder and restarted, and "Scanning installed packages" still runs forever. 

I have PyCharm 2019.2.1, and my Python interpreter in an Anaconda environment

Everything else seems to be working (I can run code).

I hesitate "cleaning PyCharm Settings" as per step one here

Should I really delete the whole content of the .PyCharmCE2019.2 folder?

0
Comment actions Permalink

After some mucking about, I finally found a solution that worked for me:

1) Run Anaconda Prompt (Anaconda3)

2) Run the following to create the environment outside of PyCharm: conda.exe create -p C:\ProgramData\Anaconda3\envs\<Project Name> -y python=3.7

3) Once this is done, choose the environment for your project from existing environments - you should be able to find the one you created above

Hope this helps!

0

Please sign in to leave a comment.