[PYTHON] Use the latest pip in a virtualenv environment

As I learned from Announcement of PyConJP 2015, it seems that pip after 7.0 has prioritized wheel over sdist when installing the library. (Reference: pip release notes) http://pip.readthedocs.org/en/stable/news/

When I tried it, some of the packages (ex. IPython) that I used to install with sdist are now installed with the wheel. I'm happy that this makes the creation time of the virtualenv environment very short.

How to install the latest pip

In my environment shown in here, Virtualenv is installed by "pip (Python) installed via Homebrew". It seems that "pip installed via Homebrew" is used in the environment created by this Virtualenv, so I upgraded the version of pip for each Python.

pip(Homebrew)Upgrade


$ brew upgrade python python3

Sure, this raised the version of pip, but at the same time raised the minor version of Python (3.4-> 3.5), and I had a problem that vim referencing the dynamic library of 3.4 did not work.

If it is safe, I think it is better to use the hook function of Virtualenv and upgrade only the pip in the created Virtualenv environment.

~/.virtualenvs/postmkvirtualenv


...
#Also make sure to use the latest setuptools
pip install --upgrade setuptools
pip install --upgrade pip
...

Recommended Posts

Use the latest pip in a virtualenv environment
pyenv + pyenv-Automatically load the virtualenv environment in the virtualenv environment
Use WebDAV in a Portable Docker environment
Set a fixed IP in the Linux environment
Work in a virtual environment with Python virtualenv.
Use a free GPU in your favorite environment
Use the CASA Toolkit in your own Python environment
Use Sudachipy's learned word2vec in a low memory environment
Use Anaconda in pyenv environment
Collaborate in a remote environment
Pip install in proxy environment
I tried the super-resolution algorithm "PULSE" in a Windows environment
How to use the __call__ method in a Python class
A story that stumbled when using pip in a proxy environment
pyenv, virtualenv Use docker to manage the environment without using
Use rospy with virtualenv in Python3
Use django-debug-toolbar in VirtualBox / Vagrant environment
UnicodeDecodeError occurs in pip (Windows environment)
Build a Selenium environment on Amazon Linux 2 in the shortest time
[Introduction to Python] How to use the in operator in a for statement?
Install Django in a pipenv virtual environment
Use the type features evolved in Sphinx-2.4
Use print in a Python2 lambda expression
Use of constraints file added in pip 7.1
Use tensorflow in an environment without root
I wanted to use jupyter notebook with docker in pip environment (opticspy)
Write the test in a python docstring
Use a scikit-learn model trained in PySpark
pyenv-Building a pypy environment using virtualenv (MacOSX)
Cut out A4 print in the image
Change the list in a for statement
Use of virtualenv, Python's independent execution environment
Resolve the Address already in use error
Run the Python interpreter in a script
I tried putting virtualenv in Cygwin environment
Use a shortcut to enable or disable the touchpad in Linux Mint
Use the command previously entered in IDLE
Use Python3's Subprocess.run () in a CGI script
Creating a virtual environment in an Anaconda environment
Install CaboCha in a non-Anaconda environment (Win)
I started Node.js in a virtual environment
Use the pip command under an HTTP proxy environment that requires authentication
Install the package in an offline environment
Arrange the numbers in a spiral shape
Use something other than a <br> string for the <br> dict key in Python
I want to use Python in the environment of pyenv + pipenv on Windows 10
Flutter in Docker-How to build and use a Flutter development environment inside a Docker container
Use libsixel to output Sixel in Python and output a Matplotlib graph to the terminal.
[AWS] Let's run a unit test of Lambda function in the local environment
Use dHash to locate on the course from a scene in a racing game
I get a strange window when I use the open directory dialog in Tkinter
Create a Django project and application in a Python virtual environment and start the server
A complete guidebook to using pyenv, pip and python in an offline environment
Instructions for connecting Google Colab. To the local runtime in a Windows environment
How to use the C library in Python
Create a Vim + Python test environment in 1 minute
[Python] Get the files in a folder with Python
Ubuntu18.04.05 Creating a python virtual environment in LTS
Use the LIKE clause in golang x SQLite3
Building a python environment with virtualenv and direnv
Get the caller of a function in Python