0

I am working in a server, a application created load a conda env that was create by a colleague in python3. However, when the application is run by other user, its run somethings python2 and sometimes python3. No idea what this is happening.

I think, I could solve this, cloning and creating a new env with my user because I am now the unique user that run this application.

I have done this

conda create --name exomedepth_clone  --clone /mainfs/wrgl/.conda/envs/exomedepth

However, when activated, the python installed is python2.

Can I build a new env with the same packages but specifying I want python3

EDIT

I have created a new env

 conda create --name exomedepth_clone2 --file exomedepth.txt python=3.7

And when activating, I still getting python2

If I try to create a conda environment as yml nothing is created I think this is due to permission issues. However, I can list the conda list -n myenv and save it in a file. But I dont know how to install them now.

  • 1
    Most packages are compatible with the current python version, it is better to re-install them if you want to update it especially if moving from python2 to python3. – subspring Apr 05 '22 at 09:21
  • https://stackoverflow.com/questions/56713744/how-to-create-conda-environment-with-specific-python-version maybe can help – edd313 Apr 05 '22 at 09:27
  • Thanks both for your help. If I try to specify the python version ``` conda create --name exomedepth_clone python=3.6 --clone /mainfs/wrgl/.conda/envs/exomedepth``` I got the error TooManyArgumentsError: did not expect any arguments for --clone Got 1 argument (python=3.6) but expected 0. – Manolo Dominguez Becerra Apr 05 '22 at 09:37
  • I agree with previous comments: There is no point in using `--clone`. It's value is in avoiding package copying, but when one switches Python versions, almost every package has to be replaced by a Python-version-specific build, hence there is very little space saving to be had. Instead, follow the duplicate, which relies on the `conda env {export,create}` commands. – merv Apr 05 '22 at 21:05

0 Answers0