How do I clone a conda environment from one python release to another?

godber

I have a python 2.7 conda environment and would like to create an equivalent environment with python 3.4. I am aware of the --clone option when creating environments, but it won't accept additional arguments, like python=3.4. Is there a way to do this automatically? I thought about trying to use the output from conda list --export, but that also encodes the python release.

asmeurer

One way would be to

conda list --export > exported-packages.txt

And then edit that file to remove the last part of each package with the py27_0 parts (you might also want to remove the versions, in case some version of a package doesn't have a Python 3 version). Then

conda create -n py3clone --file exported-packages.txt

Another idea would be to clone the environment:

conda create -n clonedenv --clone oldenv
conda install -n clonedenv python=3.4
conda update -n clonedenv --all

Note that obviously both of these will fail if you have some package that doesn't have a Python 3 version.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How do I prevent Conda from activating the base environment by default?

From Dev

How do I pass the environment of one R script to another?

From Dev

Clone Python from one linux machine to another

From Dev

How do I copy packages within a PPA from one release to another? (nonsensical "same version already has published binaries" error)

From Dev

How do I call one Flask view from another one?

From Dev

Why can I clone from one machine, but not from another?

From Dev

How can you "clone" a conda environment into the root environment?

From Dev

How do I use a conda environment with mod_wsgi?

From Dev

Python unit test how do I pass variable from one function to another

From Dev

How do I import and change a value from one script to another in python?

From Dev

How do I copy all files of one specific type from a folder to another folder in Python

From Dev

How do I add a piece of string from one df column to another in python/pandas?

From Java

How do I upgrade to Python 3.6 with conda?

From Dev

How do I upgrade to Python 3.6 with conda?

From Dev

How do I mercurial clone from stdin

From Dev

How do I import data in one pillar file from another?

From Dev

How do I pass values from one route to another in angular?

From Java

How do I call one constructor from another in Java?

From Dev

How do I copy the latest file from one directory to another?

From Dev

How do I move iCalendear entries from one server to another?

From Dev

How do I export views from one organization and import into another

From Dev

How do I open another channel from one channel in Roku?

From Dev

How do i copy data from one table to another table?

From Dev

How do I copy the latest file from one directory to another?

From Dev

How do I move an svg node from one group to another?

From Dev

How do i copy files from one directory to another directory?

From Dev

How do I display a dependency chain from one package to another?

From Dev

How do I append text from one line, to the end of another?

From Dev

How do I pass a List<int> from one job to another?

Related Related

  1. 1

    How do I prevent Conda from activating the base environment by default?

  2. 2

    How do I pass the environment of one R script to another?

  3. 3

    Clone Python from one linux machine to another

  4. 4

    How do I copy packages within a PPA from one release to another? (nonsensical "same version already has published binaries" error)

  5. 5

    How do I call one Flask view from another one?

  6. 6

    Why can I clone from one machine, but not from another?

  7. 7

    How can you "clone" a conda environment into the root environment?

  8. 8

    How do I use a conda environment with mod_wsgi?

  9. 9

    Python unit test how do I pass variable from one function to another

  10. 10

    How do I import and change a value from one script to another in python?

  11. 11

    How do I copy all files of one specific type from a folder to another folder in Python

  12. 12

    How do I add a piece of string from one df column to another in python/pandas?

  13. 13

    How do I upgrade to Python 3.6 with conda?

  14. 14

    How do I upgrade to Python 3.6 with conda?

  15. 15

    How do I mercurial clone from stdin

  16. 16

    How do I import data in one pillar file from another?

  17. 17

    How do I pass values from one route to another in angular?

  18. 18

    How do I call one constructor from another in Java?

  19. 19

    How do I copy the latest file from one directory to another?

  20. 20

    How do I move iCalendear entries from one server to another?

  21. 21

    How do I export views from one organization and import into another

  22. 22

    How do I open another channel from one channel in Roku?

  23. 23

    How do i copy data from one table to another table?

  24. 24

    How do I copy the latest file from one directory to another?

  25. 25

    How do I move an svg node from one group to another?

  26. 26

    How do i copy files from one directory to another directory?

  27. 27

    How do I display a dependency chain from one package to another?

  28. 28

    How do I append text from one line, to the end of another?

  29. 29

    How do I pass a List<int> from one job to another?

HotTag

Archive