pyenv-virtualenv icon indicating copy to clipboard operation
pyenv-virtualenv copied to clipboard

pyenv virtualenvs doesn't list conda env.

Open kundeng opened this issue 6 years ago • 4 comments

It seems to create conda env fine, but they are not listed. Can be related to issue #329

current virtualenv

(anaconda3-2019.10) Kuns-MacBook-Pro:~ kundeng$ pyenv version anaconda3-2019.10 (set by /Users/kundeng/.pyenv/version)

create one based on anaconda

(anaconda3-2019.10) Kuns-MacBook-Pro:~ kundeng$ pyenv virtualenv coursera Collecting package metadata (current_repodata.json): done Solving environment: done Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use # # $ conda activate coursera # # To deactivate an active environment, use # # $ conda deactivate

Looking in links: /var/folders/8z/1zdx7_0n4zg70ll0xtk_3w400000gn/T/tmpptb45a67 Requirement already satisfied: setuptools in /Users/kundeng/.pyenv/versions/anaconda3-2019.10/envs/coursera/lib/python3.8/site-packages (42.0.2.post20191203) Requirement already satisfied: pip in /Users/kundeng/.pyenv/versions/anaconda3-2019.10/envs/coursera/lib/python3.8/site-packages (19.3.1)

** The following should list the newly created one, but it doesnt**

(anaconda3-2019.10) Kuns-MacBook-Pro:~ kundeng$ pyenv virtualenvs

  • anaconda3-2019.10 (created from /Users/kundeng/.pyenv/versions/anaconda3-2019.10)

If you list the versions, the newly created virtualenv is there, but it is somewhat wrong, and can't be activated by pyenv activate, You can however use conda activate to activate it.

kundeng avatar Dec 29 '19 23:12 kundeng

It is different from #329 in that I have not installed conda outside pyenv.

conda is installed using pyenv install command.

It seems to be an issue already reported here #270

Has the fix been released yet?

kundeng avatar Dec 30 '19 04:12 kundeng

So I guess this project is dead too.

kundeng avatar Jan 09 '20 04:01 kundeng

Hi I also force to same problems.

chenmingsan@CHENdeMacBook-Pro ~ % pyenv virtualenv 3.8.0 test1
Looking in links: /var/folders/ct/72bxl6ms6439d4tcpytlf3h40000gn/T/tmpe7amkuks
Requirement already satisfied: setuptools in /Users/chenmingsan/.pyenv/versions/3.8.0/envs/test1/lib/python3.8/site-packages (41.2.0)
Requirement already satisfied: pip in /Users/chenmingsan/.pyenv/versions/3.8.0/envs/test1/lib/python3.8/site-packages (19.2.3

BTW, how to remove tes1? thanks

sam80719 avatar Jan 24 '20 05:01 sam80719

The answer is too late but new comer can use. If you rely on the state on README (https://github.com/pyenv/pyenv-virtualenv/blob/master/README.md#anaconda-and-miniconda) that says you can use conda itself to create virtual envs, pyenv doesn't see the envs created by conda itself without using pyenv virtualenv. When I use pyenv virtualenv name_of_your_env_goes_here then it works. Don't forget to active conda python first with pyenv shell your_conda_version.

byildiz avatar May 31 '23 13:05 byildiz