Install pip and use it with PyPy

Mar 13, 2017 Python 中文版

Since the community and ecosystem of PyPy have become better, we might have more chances to utilize it for new projects in the future. So, this post is about how to install pip and use it with PyPy.



Prerequisite

Before installing pip, make sure you have PyPy installed on your machine. I will demonstrate the following steps on Debian. To install PyPy:

# Update Debian's package manager
apt-get update

# Install PyPy and curl
apt-get -y install curl pypy


Install pip

It’s very easy to install pip for PyPy by doing this:

# Install pip
curl https://bootstrap.pypa.io/get-pip.py | pypy

# Update pip
pypy -m pip install --upgrade pip


Use pip

Here are commands for installing and removing modules:

# Install third-party module
# Usage: pypy -m pip install [module-name]
pypy -m pip install requests

# Remove module
# Usage: pypy -m pip uninstall [module-name]
pypy -m pip uninstall requests



You might also like:




If you have any suggestions, questions or even find some typos, feel free to contact me. Thank you! :)

zeckli.devforgalaxy@gmail.com   © 2015-2019 zeckli, thanks to Jekyll and GitHub.