在 Python 中使用 sudo 安装设置

在 Python 中使用 sudo 安装设置

尝试安装setup.py项目时,我收到奇怪的输出。有什么线索可以告诉我哪里做错了吗?

$ sudo python setup.py    
install/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/NAME
copying NAME/__init__.py -> build/lib/NAME
running install_lib 
creating /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/NAME
copying build/lib/NAME/__init__.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/NAME
byte-compiling /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/NAME/__init__.py to __init__.pyc
running install_egg_info
Writing /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/projectname-0.1-py2.7.egg-info

答案1

尝试:

sudo python setup.py install

相关内容