4

I've lately noticed an increasing lag when I fire up the CMD window to run python. Immediately after entering "python", I see the python version info, but instead of the command prompt (>>>) I just get a blinking cursor (not showing in screenshot). After what's now become a couple of minutes, the command prompt finally appears, and I can run python code as usual. CMD screenshot - Python missing command prompt

When this happens, the CPU on my little work laptop is clearly under heavy load, the fan goes way up. I have basically the same setup on my home PC (still with the older Anaconda and python 3.7) and never had any problems like this.

I was running python 3.7 in Anaconda on Windows 10. I just do simple scripts, copy and paste the code in a terminal window. In my original version, I had the base env + one clone, both had this problem.

I tried updating conda and anaconda but nothing changed. I thought it might be some dependency conflicts (I had recently pip-installed a couple of heavy-ish packages into my clone env: pytessearct and openpyxl), so I finally uninstalled Anaconda and reinstalled the latest version (Anaconda3-2020.07-Windows-x86_64 with python 3.8) with the standard packages, and I still have the same problem.

One related clue: Anaconda Navigator was also hecka slow to load. I tried disabling SSL verification per this thread (Anaconda navigator VERY slow) but it had no effect on the time delay for the python command prompt. But with the fresh install, Navigator now loads normally.

In my new install, I did the same setup, base + clone, both with the standard Anaconda package set, no add-ons, I still have the same problem in both envs.

DLuber
  • 151
  • 7
  • New clue: when I type exit() at the end of a python run, the same thing happens - blinking cursor, CPU fan whines, takes forever to get back to the conda shell prompt. – DLuber Oct 13 '20 at 22:48
  • 2
    I never really figured out the problem, but it may have been just Windows running out of swap file - I noticed the hard disk was getting full and other programs were slow, so I did a massive cleanup. I also removed Anaconda using the anaconda-clean utility, then installed Miniconda, then added Navigator and just the packages I needed. The Miniconda3 folder is now under 2 GB, compared to ~10 GB for the full Anaconda base + full clone. All is good now. Lesson learned, keep your Windows clean! – DLuber Oct 15 '20 at 18:47

1 Answers1

1

Old thread, but I wanted to add a suggestion not seen here that I experienced. I have anaconda installed on a non-system drive (on my d:\ in windows 10) and recently noticed a unusually slow startup (maybe 1-2 minutes?) before the anaconda prompt loaded. When the prompt finally released the system to me, I got into jupyter notebooks realized I'd closed several jupyter notebooks incorrectly and they were still being seen active/open. When I force halted those notebooks from within jupyter notebooks the anaconda prompt boot speeds subsequently dropped back to range of 10-15 seconds. I don't know if it's the problem, but is the one thing I changed and noticed a difference.

Overcheese
  • 11
  • 2