pyenv-virtualenv: `3.6.4' is not installed in pyenv
Asked Answered
D

1

14

This just confuses me and I don't know what it means. I have 3.6.4 installed on my computer(MacOS) but it doesn't want to work.

I can't think of any solution and don't know what to do.

Dreary answered 5/8, 2018 at 22:19 Comment(1)
what is the result of pyenv versions?Curr
T
21

The answer is slightly different wether you are on a Mac or a Linux (I am not that used of Windows for Python working).


Install

(MacOS =>) Be sure that the XCode CLI tools are installed on your computer.

xcode-select --install

Then, to install the virtualenv, you have to enter the following command.

pyenv install 3.6.4

Here, you can have some issues regarding the zlib library that is not available. Nevertheless, the XCode CLI should have installed zlib. So you are good to go (it still has some issues on MacOS Mojave nevertheless).


Create Virtualenv

Then create a new virtualenv for a future use :

pyenv virtualenv 3.6.4 v3.6.4


Check

Check that everything is ok and that the virtualenv is installed through the following command :

pyenv virtualenvs


Use

Then you just have to use it. For instance for a local use :

pyenv local v3.6.4


Check

Check that everything is ok:

pyenv local and it should show v3.6.4.

Tuner answered 7/8, 2018 at 12:39 Comment(2)
I had troubles similar to this. A related problem with new MacOs Big Sur and Brew installationGreatgranduncle
I also noticed the x.x.x is not installed in pyenv message when creating a virtual environment with pyenv-virtualenv 3.x.x <venv_name> instead of pyenv virtualenv 3.x.x <venv_name>.Pity

© 2022 - 2024 — McMap. All rights reserved.