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

在执行python setup.py install 命令时出现以下错误提示:

/usr/lib/python2.7/dist-packages/setuptools/dist.py:285: UserWarning: Normalizing 'v0.1' to '0.1'

  normalized_version,
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/local/lib/python2.7/dist-packages/test-easy-install-4005.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/lib/python2.7/dist-packages


解决办法:

sudo python setup.py install

猜你喜欢

转载自blog.csdn.net/miao0967020148/article/details/80221148