2

I currently have Python 2.7 and need to fully convert my Anaconda and the Spyder IDE to Python 3.6. I have a testing environment currently in Python 3.6, but my root was installed and downloaded as 2.7. I do not need to preserve Python 2.7 capabilities. Before I mess up my Anaconda... do these steps make sense to convert my root to Python 3.6?

source activate root conda update conda conda update --all python=3.6

Would I need conda update anaconda and conda update spyderas well?

Emily K
  • 230
  • 4
  • 14

1 Answers1

0

You've got a few options.

  1. Update the current environment by installing python 3.6 into it. e.g.:

$ conda install python=3.6

Note that this will not work if you have any packages installed that are not python 3.6 compatible. If you do have conda packages that are not py3.6 compatible, you'll get errors like:

$ conda update --all python=3.6
Fetching package metadata .............
Solving package specifications: ....


UnsatisfiableError: The following specifications were found to be in conflict:
  - enum34
  - python 3.6*
Use "conda info <package>" to see the dependencies for each package.

And you'll need to go through and remove all of the offending packages.

  1. Another option is to create a new conda environment with python 3.6 and spyder (and any other dependencies that you need).

    $ conda create -n py36 python=3.6 spyder ..

    $ source activate py36

    $ spyder

  2. Final option is to remove your conda folder and then reinstall anaconda with python 3.6 or miniconda with python 3.6.

Eric Dill
  • 2,166
  • 2
  • 17
  • 15
  • That first option with 'conda install...' and then 'conda update --all...' will update Spyder as well? – Emily K May 16 '17 at 13:16
  • It'll update everything unless there are packages installed that are not python 3.6 compatible. There's also a way to undo changes in case something goes poorly: `conda list --revisions` and `conda install --revisions `. More detail [here](http://stackoverflow.com/a/35526770/3781327) – Eric Dill May 16 '17 at 14:12
  • Ok great. Trying this out tomorrow afternoon, so I'll report back if all goes well! – Emily K May 16 '17 at 15:01
  • I got the unsatisfiable error, and removed the enum34 package, but now am getting "ImportError: No module named enum" no matter what conda command I use... Going to instead just uninstall and do a fresh install of Anaconda :/ – Emily K May 17 '17 at 16:47