Questions tagged [pyenv]

pyenv lets you switch between multiple versions of Python. It's unobtrusive and follows the UNIX tradition of single-purpose tools that do one thing well.

pyenv lets you switch between multiple versions of Python. It's unobtrusive and follows the UNIX tradition of single-purpose tools that do one thing well.

https://github.com/yyuu/pyenv

857 questions
2016
votes
8 answers

What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Python 3.3 includes in its standard library the new package venv. What does it do, and how does it differ from all the other packages that match the regex (py)?(v|virtual|pip)?env?
Flimm
  • 136,138
  • 45
  • 251
  • 267
260
votes
3 answers

What is the difference between pyenv, virtualenv, anaconda?

I am a ruby programmer trying to learn python. I am pretty familiar with pyenv since it is like a copy and paste from rbenv. Pyenv helps allow to have more than one version of python in a system and also to isolate the python without touching…
channa ly
  • 9,479
  • 14
  • 53
  • 86
220
votes
29 answers

Cannot switch Python with pyenv

I would like to use pyenv to switch python2 and python3. I successfully downloaded python2 and python3 and pyenv with following code. brew install pyenv brew install pyenv-virtualenv pyenv install 2.7.10 pyenv install 3.5.0 However, I cannot…
Soma Suzuki
  • 2,241
  • 2
  • 10
  • 4
218
votes
3 answers

What is the relationship between virtualenv and pyenv?

I recently learned how to use virtualenv and virtualenvwrapper in my workflow but I've seen pyenv mentioned in a few guides but I can't seem to get an understanding of what pyenv is and how it is different/similar to virtualenv. Is pyenv a…
truth1ness
  • 4,831
  • 5
  • 21
  • 19
130
votes
7 answers

What shebang to use for Python scripts run under a pyenv virtualenv

When a Python script is supposed to be run from a pyenv virtualenv, what is the correct shebang for the file? As an example test case, the default Python on my system (OS X) does not have pandas installed. The pyenv virtualenv venv_name does. I…
xgord
  • 4,606
  • 6
  • 30
  • 51
126
votes
1 answer

Finding versions of Python that are available for "pyenv install"

I want to know what Python versions I could install using the pyenv install command. pyenv versions lists only installed versions and does not appear to have an option to list available versions. How can I find out what versions of Python I can…
Wayne Conrad
  • 103,207
  • 26
  • 155
  • 191
118
votes
4 answers

Failed to activate virtualenv with pyenv

I run: pyenv activate new_app And I get: Failed to activate virtualenv. Perhaps pyenv-virtualenv has not been loaded into your shell properly. Please restart current shell and try again. I am trying to follow this tutorial:…
Romulus
  • 1,534
  • 2
  • 11
  • 18
80
votes
23 answers

PyEnv BUILD FAILED installing Python on MacOS

While trying to install Python 3.6.6 (for Airflow) using PyEnv on MacOS, I am encountering build failure with following…
y2k-shubham
  • 10,183
  • 11
  • 55
  • 131
73
votes
14 answers

Poetry doesn't use the correct version of Python

I've recently installed both Pyenv and Poetry and want to create a new Python 3.8 project. I've set both the global and local versions of python to 3.8.1 using the appropriate Pyenv commands (pyenv global 3.8.1 for example). When I run pyenv version…
P4nd4b0b3r1n0
  • 1,951
  • 3
  • 22
  • 31
66
votes
6 answers

Unable to install tkinter with pyenv Pythons on MacOS

Versions of Python installed via pyenv fail to import tkinter: ※ python Python 3.8.1 (default, Feb 29 2020, 11:45:59) [Clang 11.0.0 (clang-1100.0.33.17)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import…
Carl G
  • 17,394
  • 14
  • 91
  • 115
58
votes
11 answers

ModuleNotFoundError: No module named '_lzma' when building python using pyenv on macos

Trying to use pyenv to build python versions on macOS, but every install I make ends up with ❯ python >>> import lzma ModuleNotFoundError: No module named '_lzma' I have installed all of the following packages: brew install openssl readline…
Paulo Costa
  • 965
  • 2
  • 10
  • 15
55
votes
9 answers

pyenv zlib error on MacOS:

My goal I am trying to install Python 2.7.5 and 3.6.5 side-by-side on my MBP with with pyenv. pyenv Installation Following How can I use Homebrew to install both Python 2 and 3 on Mac? , I tried: $ pyenv install 3.6.5 Which erred…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
53
votes
2 answers

Why is python 3.6.1. not available in pyenv?

According to python.org, Python 3.6.1 was released at the end of March. But: » pyenv install -l | grep 3\.6\. 3.6.0a1 3.6.0a3 3.6-dev Why is Python 3.6.1 not yet available in pyenv? Where can I find documentation about the releases that…
blueFast
  • 41,341
  • 63
  • 198
  • 344
50
votes
7 answers

How can I make homebrew's python and pyenv live together?

After switching to python 3.4.3 from 2.7.9 (which was quite simple), I often wish to test some of my scripts with python 2.7.9 before sharing them with colleagues. I am using a OSX yosemite platform with everything compiled from homebrew. The…
meduz
  • 3,903
  • 1
  • 28
  • 40
49
votes
3 answers

how to uninstall pyenv(installed by homebrew) on Mac

I used to install pyenv by homebrew to manage versions of python, but now, I want to use anaconda.But I don't know how to uninstall pyenv.Please tell me.
David Chan
  • 641
  • 1
  • 7
  • 10
1
2 3
57 58