I set the python operating environment on OSX Yosemite (pyenv + pip)

  1. Install pyenv brew install pyenv

  2. Install a plugin to automate pyenv rehash brew install pyenv-pip-rehash

  3. Add pyenv information to the shell startup script (replace the zsh part in the case of bash)

echo 'export PYENV_ROOT="${HOME}/.pyenv"' >> ~/.zshrc


echo 'if [ -d "${PYENV_ROOT}" ]; then' >> ~/.zshrc
echo '    export PATH=${PYENV_ROOT}/bin:$PATH' >> ~/.zshrc
echo '    eval "$(pyenv init -)"' >> ~/.zshrc
echo 'fi' >> ~/.zshrc
exec $SHELL -l```

 4) Install a specific version of python with pyenv

#### **`pyenv install 3.4.2`**
  1. Determine the version of python in a particular directory

pyenv local 3.4.2



 6) Install pip with easy_install
```sudo easy_install pip```

 7) Confirm (in the directory where version was determined in step 5)
```which python```
/Users/Owner/.pyenv/shims/python

```python --version```
Python 3.4.2

```which easy_install```
/Users/Owner/.pyenv/shims/easy_install

```easy_install --version```
setuptools 2.1

```pip --version```
pip 1.5.6 from /Users/Owner/.pyenv/versions/3.4.2/lib/python3.4/site-packages (python 3.4)


 The following is difficult to understand
 1) When using pip, easy_install is used only when installing pip.
 It's like buying Windows and not using IE after first installing Chrome in IE.
 Because pip is a partial replacement for easy_install.

 2) When installing pip, permission is denied without sudo. To touch directories that root needs.


Recommended Posts

I set the python operating environment on OSX Yosemite (pyenv + pip)
I want to use Python in the environment of pyenv + pipenv on Windows 10
I installed Pygame with Python 3.5.1 in the environment of pyenv on OS X
Kivy + Python3 on OSX environment maintenance
Set up Python environment on CentOS
Build Python environment on Ubuntu (when pip is not the default)
Set the environment variable PYTHONPATH on zsh
Create an OpenCV3 + python3 environment on OSX
I easily built an operating environment for Python3 + Tornado on AWS EC2.
I set the environment variable with Docker and displayed it in Python
Build python environment with pyenv on EC2 (ubuntu)
Set up python Tornado environment on raspbian jessie
Put Python 2.7.x on Mac OSX 10.15.5 with pyenv
Set up a Python development environment on Marvericks
Create a Python execution environment on IBM i
Prepare the development environment for Python on AWS Cloud9 (pip install & time change)
I tried Python on Mac for the first time.
How to set up a Python environment using pyenv
I tried python on heroku for the first time
I made a Python3 environment on Ubuntu with direnv.
Make it easy to install the ROS2 development environment with pip install on Python venv
Build a Python environment on your Mac using pyenv
Build a Python development environment using pyenv on MacOS
Install pyenv on OSX
Install Python environment on local PC (pyenv, venv on Mac)
I want to set up a GUI development environment with Python or Golang on Mac
Python environment construction on Mac (pyenv, virtualenv, anaconda, ipython notebook)
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
[Python] I installed the game from pip and played it
Build a Python extension for E-Cell 4 on Mac OSX (Yosemite)
I want to know the features of Python and pip
I tried changing the python script from 2.7.11 to 3.6.0 on windows10
Until building a Python development environment using pyenv on Ubuntu 20.04
Set up Python 3.4 on Ubuntu
Build Python environment on Windows
Build python environment on windows
Pyenv on Mac OSX Mavericks
I ran python on windows
Environment construction of python2 & 3 (OSX)
I downloaded the python source
Life game with Python [I made it] (on the terminal & Tkinter)
How to rebuild python environment from pyenv on Mac environment (El Capitan)
[Python] I wrote the route of the typhoon on the map using folium
Construction of Python local development environment Part 1 (pyenv, pyenv-virtualenv, pip installation)
Continuation ・ Notes on preparing the Python development environment on Mac OS X
I get an error when I put a Python plugin in Visual Studio Code under the pyenv environment
Building a Python environment on Mac
Python environment construction memo on Windows 10
Prepare Python development environment on Ubuntu
Anaconda python environment construction on Windows 10
Building a Python environment on Ubuntu
Install python2.7 on windows 32bit environment
Introducing Python using pyenv on Ubuntu 20.04
Create a Python environment on Mac (2017/4)
Install Python on Windows + pip + virtualenv
I checked Mac Python environment construction
Set python compile options with pyenv
Python environment construction memo on Mac
Python environment construction (pyenv, anaconda, tensorflow)
Python development environment construction on macOS
Python environment construction (pyenv + poetry + pipx)