2

I'm trying to update/upgrade my Python with conda. I run the command:

conda update conda

but it crashes my Python:

Python has stopped working

A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.

enter image description here

My installation information is:

conda version : 4.5.2
conda-build version : 3.0.27
python version : 3.6.3.final.0

I googled the issue and got this github issue report. Unfortunately none of the solutions worked for me. I would appreciate if you could help me know what is the problem and how I can solve it.

  • I tried uninstalling and reinstalling conda and the problem disappeared temporarily. But then the issue happened again while I was trying to use matplotlib.

  • I experienced the exact same issue one a different machine when running conda update --all so either there is something wrong with conda or I'm making one mistake twice! (conda/python versions were exactly the same as above.)

  • I tried updating/upgrading all of the packages running the command in this post on admin-cmd. It took a long time to finish and the problem was still there.

  • There seemed to be issues with Qt. So I tried to uninstall and reinstall Qt and pyqt but it did not solve the problem either.

temporary workaround: I completely uninstalled Anaconda and installed stock Python. So far this has solved the problem both on my home and work computers.

Community
  • 1
  • 1
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193
  • @smci thanks for the edit. – Foad S. Farimani May 07 '18 at 08:47
  • 1
    *"I experienced the exact same issue on a different machine when running conda update --all"* Helpful if you can tell us the conda version, conda build version, Win10 version, pip version... – smci May 07 '18 at 08:49
  • @smci They were exactly the same as the one I mentioned for my home computer. – Foad S. Farimani May 07 '18 at 08:50
  • @smci the pip version I forgot to mention and unfortunately I have reinstalled python so I can't give it now. I did not presume it will be important. – Foad S. Farimani May 07 '18 at 08:53
  • 1
    Ah the joy of reproducibility... if you believe you know a later version of conda which seems to fix this, then post that here as an answer.. and maybe accept an answer in a few months if you know then. – smci May 07 '18 at 08:57
  • @smci I had to get some work done so I completely uninstalled Anaconda and installed the stock/vanilla python from the official website and then installed the packages I needed with pip: numpy, scipy, sympy, matplotlib, jupyter... – Foad S. Farimani May 07 '18 at 08:59
  • 1
    Yeah I know the feeling totally. Just wondering what we can and should do this question now. – smci May 07 '18 at 09:00
  • @smci please let me know if I should delete it. – Foad S. Farimani May 07 '18 at 09:01
  • 1
    Well the [github issue was closed in 5/2017 by reinstalling most stuff, but still under Anaconda, and resolving an OpenSSL issue](https://github.com/conda/conda/issues/5337). Not what you did. I suppose you could post and accept your own answer of what you did and/or what the person in the github issue did. – smci May 07 '18 at 09:03
  • @smci hmmm, but I'm not sure if what I did is a real solution. I just invasively uninstalled everything and installed python. even reinstalling Anaconda did not work. You are the expert if you say so I will do it anyway :) – Foad S. Farimani May 07 '18 at 09:05
  • 1
    Honestly, don't sweat it too much, install issues are usually a pain, just document what you did and maybe what other people report they did, and accept whatever answer makes sense. No point in letting this linger, since the github was closed and it doesn't seem to recur with current versions. – smci May 07 '18 at 09:07

2 Answers2

1

Try conda update --all or if you're trying to update / upgrade specifically python then try conda update python. Faced such problem and it worked for me.

Innat
  • 16,113
  • 6
  • 53
  • 101
  • Is error showing only when you try to update your python packages ? And is it python packages or only python according to your question ? Do you create any virtual environment ? – Innat May 05 '18 at 14:05
  • 1
    With due respect you should add more error information in you question. It looks like conda package manager has broken somehow.You might already try pip ; you should reinstall anaconda if necessary. – Innat May 05 '18 at 14:26
  • 1
    Sure. I indeed did try a lot of things. The reason I did not include all of them in the OP was to avoid a long and confusing post. I tried pip and got some of the packages updated. now I'm trying to uninstall and reinstall Anaconda to see if the problem still persists., – Foad S. Farimani May 05 '18 at 14:28
  • 1
    @Foad: just summarize in a terse bulleted list everything you tried – smci May 07 '18 at 08:38
  • @smci the only things I have not mentioned are related to pip. I tried command suggested in [this post](https://stackoverflow.com/a/3452888/4999991) using pip to upgrade/update itself and other packages. It took ages to update everything but the problem still persists. I tried the `conda update conda` command again on my work computer today and the exact same thing happened. – Foad S. Farimani May 07 '18 at 08:42
  • @smci oh I also tried uninstalling ans reinstalling Qt and pyqt. it did not solve the problem. – Foad S. Farimani May 07 '18 at 08:45
  • 1
    Sounds like a hard-to-pinpoint bug (Win10 only?). But please still add (in your question) what version(s) of pip? – smci May 07 '18 at 08:48
  • @smci both computers are Windows 10. Sadly I forgot to mention the pip version and I have reinstalled python because I had to get some work done immediately. – Foad S. Farimani May 07 '18 at 08:57
1

As was suggested by the mods, here I post my temporary solution. Considering that none of the other attempts (reinstalling Qt, Anaconda, updating with pip...) worked, I ended up uninstalling Anaconda and everything pythony and installed the stock / vanilla python from the official website. This has solved the issue so far. Please consider this is not a solution to the problem mentioned above but just to get the python working for the time being.

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193