Skip to content

Conda 4.4.4 breaks pyenv virtual environments #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
melentye opened this issue Dec 29, 2017 · 9 comments
Open

Conda 4.4.4 breaks pyenv virtual environments #246

melentye opened this issue Dec 29, 2017 · 9 comments

Comments

@melentye
Copy link

How to reproduce

  • pyenv install miniconda3-latest (the result is actually the same with miniconda3-4.3.3 since conda gets updated to 4.4.4 during the install)
  • pyenv virtualenv miniconda3-latest my-env

After performing the above steps, pyenv which conda doesn't list my-env as one of the environments that have the executable, it's missing in ~/.pyenv/versions/miniconda3-latest/envs/my-env/bin/ and upon the environment's activation with pyenv activate my-env, conda command is not available.

Workaround

After installing miniconda3-latest, downgrade conda to 4.3.30:

  • pyenv activate miniconda3-latest
  • conda install conda=4.3.30
  • re-create the affected virtual environments

Just speculating here, but the issue may be caused by https://www.anaconda.com/blog/developer-blog/how-to-get-ready-for-the-release-of-conda-4-4/ in Conda 4.4.4, for example the name of the default environment has been changed from "root" to "base".

@ohlookemus
Copy link

Thank you for the temporary workaround. I ran into this issue earlier today when upgrading my miniconda versions.

@willprice
Copy link

More reports for this issue are also present in #178

@gzagatti
Copy link

I have the same problem here.

@lmmarsano
Copy link
Contributor

#290 was recently merged.
Does the issue persist?

@clbarnes
Copy link

clbarnes commented Nov 23, 2018

I can now access the conda environment through pyenv activate myenv, but pyenv which conda points to the root conda version rather than the conda environment's bin directory.

@lmmarsano
Copy link
Contributor

but pyenv which conda points to the root conda version rather than the conda environment's bin directory

I think the root conda executable serves all environments now.
In my tests with the latest conda release and pyenv removed, conda create -n test doesn't even create a bin directory, so that appears to be the new design.

Do your conda environments work with pyenv?
Can you

  • pyenv versions
  • pyenv virtualenvs
  • pyenv local version
  • pyenv virtualenv root-conda new-version
  • pyenv virtualenv-delete version

with conda environments?

@clbarnes
Copy link

Just checked: all of those work. It just surprised me that the conda binary in the root environment would install packages in my activated environment rather than the root one.

@jimmywan
Copy link

Can we close this?
At some point along the line I just got used to the conda tool not being available from virtualenvs of my miniconda install and it wasn't that big a deal. I just do something like:

pyenv shell miniconda3-latest
conda install -n my_env foo==3.3
pyenv shell --unset

@native-api
Copy link
Member

native-api commented Apr 14, 2024

At some point along the line I just got used to the conda tool not being available from virtualenvs of my miniconda install and it wasn't that big a deal. I just do something like:

If conda is available after you do regular conda activate, this is something worth fixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants