Failed building wheel for X when using pip install [Solved]

pip install wheel
pip3 install wheel

# ️ if you don't have pip in your PATH environment variable
python -m pip install wheel
python3 -m pip install wheel
py -m pip install wheel

You should also upgrade your version of pip.
Here are the commands for upgrading pip on all operating systems.

# ️ if you have pip already installed
pip install --upgrade pip

# ️ if your pip is aliased as pip3 (Python 3)
pip3 install --upgrade pip

# ️ if you don't have pip in your PATH environment variable
python -m pip install --upgrade pip

# ️ if you don't have pip in your PATH environment variable
python3 -m pip install --upgrade pip

# ️ if you have easy_install
easy_install --upgrade pip

# ️ if you get a permissions error
sudo easy_install --upgrade pip

# ️ if you get a permissions error when upgrading pip
pip install --upgrade pip --user

# ️ upgrade pip scoped to the current user (if you get permissions error)
python -m pip install --user --upgrade pip
python3 -m pip install --user --upgrade pip

# ️ Installing directly from get-pip.py (MacOS and Linux)
curl https://bootstrap.pypa.io/get-pip.py | python

# ️ if you get permissions issues
curl https://bootstrap.pypa.io/get-pip.py | sudo python

# ️ alternative for Ubuntu/Debian
sudo apt-get update && apt-get upgrade python-pip

# ️ alternative for Red Hat / CentOS / Fedora
sudo yum install epel-release
sudo yum install python-pip
sudo yum update python-pip

After you upgrade pip, upgrade setuptools as well.

pip install --upgrade setuptools
pip3 install --upgrade setuptools

# ️ if you don't have pip in your PATH environment variable
python -m pip install --upgrade setuptools
python3 -m pip install --upgrade setuptools

If the error is not resolved, try installing the package with the --no-cache-dir option to disable the cache.

pip install requests --no-cache-dir
pip3 install requests --no-cache-dir

If the error is not resolved, try running the pip install command with the --no-use-pep517 option.

pip install --no-use-pep517 requests
pip3 install --no-use-pep517 requests

python -m pip install --no-use-pep517 requests
python3 -m pip install --no-use-pep517 requests

你可能感兴趣的:(Python,pip,python,linux)