I try to install uvloop
into a Python 3.9 venv on CentOS 7. These are all actions I take:
cd ~
mkdir python_envs
cd python_envs
python -m venv test
source test/bin/activate
pip install --upgrade pip
pip install uvloop
Then I get this:
Collecting uvloop
Using cached uvloop-0.14.0.tar.gz (2.0 MB)
Using legacy 'setup.py install' for uvloop, since package 'wheel' is not installed.
Installing collected packages: uvloop
Running setup.py install for uvloop ... error
ERROR: Command errored out with exit status 1:
command: /home/music/python_envs/test/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-85ij25up/uvloop_2c4ab2d368cc414bb626701bc788f90f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-85ij25up/uvloop_2c4ab2d368cc414bb626701bc788f90f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l3ksyogz/install-record.txt --single-version-externally-managed --compile --install-headers /home/music/python_envs/test/include/site/python3.9/uvloop
cwd: /tmp/pip-install-85ij25up/uvloop_2c4ab2d368cc414bb626701bc788f90f/
Complete output (76 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/uvloop
copying uvloop/_noop.py -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/_patch.py -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/__init__.py -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/_testbase.py -> build/lib.linux-x86_64-3.9/uvloop
running egg_info
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.txt
writing top-level names to uvloop.egg-info/top_level.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
copying uvloop/cbhandles.pxd -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/cbhandles.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/dns.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/errors.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/loop.c -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/loop.pxd -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/loop.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/lru.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/pseudosock.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/request.pxd -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/request.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/server.pxd -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/server.pyx -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/sslproto.pxd -> build/lib.linux-x86_64-3.9/uvloop
copying uvloop/sslproto.pyx -> build/lib.linux-x86_64-3.9/uvloop
creating build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/async_.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/async_.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/basetransport.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/basetransport.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/check.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/check.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/handle.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/handle.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/idle.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/idle.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/pipe.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/pipe.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/poll.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/poll.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/process.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/process.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/stream.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/stream.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/streamserver.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/streamserver.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/tcp.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/tcp.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/timer.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/timer.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/udp.pxd -> build/lib.linux-x86_64-3.9/uvloop/handles
copying uvloop/handles/udp.pyx -> build/lib.linux-x86_64-3.9/uvloop/handles
creating build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/__init__.py -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/compat.h -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/consts.pxi -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/debug.h -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/debug.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/flowcontrol.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/fork_handler.h -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/python.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/stdlib.pxi -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/system.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
copying uvloop/includes/uv.pxd -> build/lib.linux-x86_64-3.9/uvloop/includes
running build_ext
error: [Errno 13] Permission denied: './configure'
----------------------------------------
ERROR: Command errored out with exit status 1: /home/music/python_envs/test/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-85ij25up/uvloop_2c4ab2d368cc414bb626701bc788f90f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-85ij25up/uvloop_2c4ab2d368cc414bb626701bc788f90f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l3ksyogz/install-record.txt --single-version-externally-managed --compile --install-headers /home/music/python_envs/test/include/site/python3.9/uvloop Check the logs for full command output.
I think the key error message is error: [Errno 13] Permission denied: './configure'
, but I don't know which directory this occurs.
I have already read this answer and some related info but it seems not to solve my problem:
pip install failing with: OSError: [Errno 13] Permission denied on directory
install in env
: as you see, I do this in a brand new env but not work.pip install --user
: not work, I get this:ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
pip install --user
+ modify include-system-site-packages = false
to true
in pyvenv.cfg
of the env: installation can be started, but back to original permission denied problem.sudo
: not safe and will cause other problems. I will keep this as the last solution.chmod -R 777 test
: this is not a solution, just a test for making sure the problem is not on the permissions of env directories. The same permission problem still occurs.
I know there are some different install methods can avoid this permission problem, but I want to know the reason, and is there a way to make pip install -r requirement.txt
work well without handling this special case?Even I do
sudo -s # become root
source test/bin/activate
pip install uvloop
and still the same problem error: [Errno 13] Permission denied: './configure'
is happened.
I have no idea how could this happed.
You can download uvloop wheel from here.
Then use pip install uvloop-XXX.whl
But I found that there is no version corresponding to python3.9.