如何在mac上安装pyperclip?

2024-10-01 07:44:35 发布

您现在位置:Python中文网/ 问答频道 /正文

Yangs-iMac:~ yangxu$ sudo pip install pyperclip
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/Users/yangxu/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pyperclip in /Library/Python/2.7/site-packages (1.8.2)
Yangs-iMac:~ yangxu$ sudo pip -H install pyperclip

Usage:   
  pip <command> [options]

no such option: -H

Tags: installpipoftheinsupportissudo
1条回答
网友
1楼 · 发布于 2024-10-01 07:44:35

首先,正如错误所说,Python 2.7不推荐使用。我建议您升级python版本

第二个错误表示pyperclip已安装。因此无需再次安装

第三,不要安装带有sudo的python包

最后,pyperclip现在改为pyclip

相关问题 更多 >