1

I am trying to upgrade from python 3.4 to 3.6 and to reinstall all the packages from my 3.4 version into the 3.6 version automatically.

Now apparently it is not possible to upgrade in place for a major version, so i resorted to create a new conda env with conda create -name python36 python=3.6. i also tried to upgrade it place but it failed. Before that I created a list of the module in my 34 version by type conda --list > packages.txt

I tried to install both pandas and the packages using conda create -name python36 python=3.6 --file packages.txt but i receive an error message could not parse 'anaconda-client 1.6.0 py34_0' in: python3_packages.txt. I tried to create the env, then to install the packages but same pb.

Any idea what is wrong here? I saw the other questions about that on SO but they dont touch of the topic of the installing of packages from text files.

jim jarnac
  • 4,804
  • 11
  • 51
  • 88

2 Answers2

1

It would be wise to update the anaconda itself. This would make updates on all the packages installed including python to 3.6. Use the code below on your anaconda terminal. Make sure you run the terminal as an administrator

conda update python
Michael Elimu
  • 61
  • 2
  • 7
0

There are a few ways you can replicate environments. You may want to try all of these options if one isn't working. You can export using one of these two commands. You must first have activated the environment that you are trying to export.

conda list > environment.txt
conda env export > environment.txt

You can create an env from a text file using:

conda env create -f environment.txt
conda create --name MyEnvironment --file environment.txt

I noticed that you typed "-name python36" which might be a typo but it must be "--name python36."

ally-e
  • 1,515
  • 10
  • 13
  • thx - conda env export will create a yaml file that describe in detail (and esp the python version) for each module. which means that its not good for upgrading. It might be possible to try to edit manually the file so it doesnt not contain ref to the original ython version, but i doubt that would work. `The cond list >` idea is what i tried in the first place - and it did not work either. The file produced looks a lot like a pip freeze requiremen.txt file but cannot be use with conda like you suggest (see the error i receive in my question). Eventually i hdd to install the packages manually.. – jim jarnac Apr 25 '17 at 15:54