Whenever I try to install any package from pip(pip install --upgrade bottle-websocket
for example)
I always get the same error, wheel fails to build, I have already tried to upgrade setuptools and wheel and pip, everything, but still I get the same error.
pip install --upgrade bottle-websocket
WARNING: Skipping /usr/local/lib/python3.11/dist-packages/pytube-12.1.3-py3.11.egg-info due to invalid metadata entry 'name'
Collecting bottle-websocket
Using cached bottle-websocket-0.2.9.tar.gz (2.0 kB)
Preparing metadata (setup.py) ... done
Collecting bottle (from bottle-websocket)
Using cached bottle-0.12.25-py3-none-any.whl (90 kB)
Collecting gevent-websocket (from bottle-websocket)
Using cached gevent_websocket-0.10.1-py3-none-any.whl (22 kB)
Requirement already satisfied: gevent in /usr/lib/python3/dist-packages (from gevent-websocket->bottle-websocket) (22.10.2)
Building wheels for collected packages: bottle-websocket
Building wheel for bottle-websocket (setup.py) ... error
error: subprocess-exited-with-error
� python setup.py bdist_wheel did not run successfully.
? exit code: 1
??> [41 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/bottle_websocket
copying bottle_websocket/plugin.py -> build/lib/bottle_websocket
copying bottle_websocket/server.py -> build/lib/bottle_websocket
copying bottle_websocket/__init__.py -> build/lib/bottle_websocket
/usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer, pypa/build or
other standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
installing to build/bdist.linux-aarch64/wheel
running install
running install_lib
creating build/bdist.linux-aarch64
creating build/bdist.linux-aarch64/wheel
creating build/bdist.linux-aarch64/wheel/bottle_websocket
copying build/lib/bottle_websocket/plugin.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
copying build/lib/bottle_websocket/__init__.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
copying build/lib/bottle_websocket/server.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
running install_egg_info
running egg_info
writing bottle_websocket.egg-info/PKG-INFO
writing dependency_links to bottle_websocket.egg-info/dependency_links.txt
writing requirements to bottle_websocket.egg-info/requires.txt
writing top-level names to bottle_websocket.egg-info/top_level.txt
reading manifest file 'bottle_websocket.egg-info/SOURCES.txt'
writing manifest file 'bottle_websocket.egg-info/SOURCES.txt'
Copying bottle_websocket.egg-info to build/bdist.linux-aarch64/wheel/bottle_websocket-0.2.9-py3.11.egg-info
error: [Errno 13] Permission denied: 'build/bdist.linux-aarch64/wheel/bottle_websocket-0.2.9-py3.11.egg-info/dependency_links.txt'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for bottle-websocket
Running setup.py clean for bottle-websocket
Failed to build bottle-websocket
ERROR: Could not build wheels for bottle-websocket, which is required to install pyproject.toml-based projects
This is the error
So I made it work out, the answer was simple, I had to do it with root privileges, I typed sudo -i
and typed in the installation command and it worked!