我正在尝试将Pyperclip
与Pip
一起安装,但是我收到一条警告,说“ Python 2.7将于2020年1月1日到期。”并告诉我升级。之后,我在安装过程中遇到了很多错误。
我的系统上安装了Python 2.7.10和3.7.3。
启动pip install pyperclip
时出现错误:
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pyperclip
Using cached https://files.pythonhosted.org/packages/2d/0f/4eda562dffd085945d57c2d9a5da745cfb5228c02bc90f2c74bbac746243/pyperclip-1.7.0.tar.gz
Installing collected packages: pyperclip
Running setup.py install for pyperclip ... error
ERROR: Complete output from command /usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/b5/yshbmh_d1352tytvt1r95hwr0000gn/T/pip-install-EKTm69/pyperclip/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b5/yshbmh_d1352tytvt1r95hwr0000gn/T/pip-record-ntOrdw/install-record.txt --single-version-externally-managed --compile:
ERROR: running install
running build
running build_py
creating build
creating build/lib
creating build/lib/pyperclip
copying src/pyperclip/__init__.py -> build/lib/pyperclip
copying src/pyperclip/__main__.py -> build/lib/pyperclip
running install_lib
creating /Library/Python/2.7/site-packages/pyperclip
error: could not create '/Library/Python/2.7/site-packages/pyperclip': Permission denied
----------------------------------------
ERROR: Command "/usr/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/b5/yshbmh_d1352tytvt1r95hwr0000gn/T/pip-install-EKTm69/pyperclip/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/b5/yshbmh_d1352tytvt1r95hwr0000gn/T/pip-record-ntOrdw/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b5/yshbmh_d1352tytvt1r95hwr0000gn/T/pip-install-EKTm69/pyperclip/
我希望Pyperclip能够正确安装。