python manual package installation error: error: can't create or remove files in install directory

created at 12-08-2021 views: 82

error

install command

[test@localhost redis-2.10.3]$ python setup.py install

running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/test-easy-install-84826.write-test'

...

solution

No permission, authorization is required, or use the sudo command
It should be noted here that after installation, the installed package can only be used in the package directory, not other environments

[test@localhost redis-2.10.3]$ sudo python setup.py install
created at:12-08-2021
edited at: 12-08-2021: