Python 安装第三方模块-自动化无聊的东西第6章-附录A

Python 安装第三方模块-自动化无聊的东西第6章-附录A,python,importerror,Python,Importerror,MacOS,通过ATBS Ch 6工作,我被要求阅读附录A,下载并安装python所需的3P模块。为此,我被要求在本地下载,然后在终端中运行以下命令: $ pip3 install --user –r automate-mac-requirements.txt --user 这样做会导致以下错误: ERROR: Invalid requirement: '–r' 我已经阅读了pip install-h,但不知道如何解决这个问题 我尝试删除-r标志,结果是: ERROR: Could not

MacOS,通过ATBS Ch 6工作,我被要求阅读附录A,下载并安装python所需的3P模块。为此,我被要求在本地下载,然后在终端中运行以下命令:

$ pip3 install --user –r automate-mac-requirements.txt --user
这样做会导致以下错误:

ERROR: Invalid requirement: '–r'
我已经阅读了
pip install-h
,但不知道如何解决这个问题

我尝试删除-r标志,结果是:

ERROR: Could not find a version that satisfies the requirement automate-mac-requirements.txt (from versions: none)
ERROR: No matching distribution found for automate-mac-requirements.txt
ERROR: Invalid requirement: '/Users/{user}/Downloads/automate_online-materials/automate-mac-requirements.txt'
Hint: It looks like a path. It does exist. The argument you provided (/Users/{user}/Downloads/automate_online-materials/automate-mac-requirements.txt) appears to be a
 requirements file. If that is the case, use the '-r' flag to install the packages specified within it.
我尝试用完整路径替换命令中的.txt文件名,但错误是相同的

我尝试用完整路径替换命令中的文件,并删除-r标志,结果是:

ERROR: Could not find a version that satisfies the requirement automate-mac-requirements.txt (from versions: none)
ERROR: No matching distribution found for automate-mac-requirements.txt
ERROR: Invalid requirement: '/Users/{user}/Downloads/automate_online-materials/automate-mac-requirements.txt'
Hint: It looks like a path. It does exist. The argument you provided (/Users/{user}/Downloads/automate_online-materials/automate-mac-requirements.txt) appears to be a
 requirements file. If that is the case, use the '-r' flag to install the packages specified within it.
如果我加上标志-r,我就回到了我开始的地方

为了继续前进,我将尝试手动安装附录A中的模块(例如
pip安装--user send2trash==1.5.0,
)。这样做似乎适用于某些模块,但在各种情况下会引发其他错误


感谢您帮助我们理解在试图按照看似基本的说明从文件中安装所有3P模块时出现的问题。提前谢谢。

书中有一个打字错误。他使用
-r
而不是
-r


尝试使用
pip3安装--user-r automation-mac-requirements.txt--user

书中有一个打字错误。他使用
-r
而不是
-r


尝试使用
pip3安装--user-r automation-mac-requirements.txt--user

这些都是相同的-r标志。。。不您的pip3命令与我的命令完全相同。其中的字符之间存在细微差异,答案可以明确阐述。一个是字母破折号(U+2013),另一个是预期的减号(U+002D)。这是一篇老文章,但这确实帮助了我。我从未注意到如此微小的差异。非常感谢。这些都是相同的-r标志。。。不您的pip3命令与我的命令完全相同。其中的字符之间存在细微差异,答案可以明确阐述。一个是字母破折号(U+2013),另一个是预期的减号(U+002D)。这是一篇老文章,但这确实帮助了我。我从未注意到如此微小的差异。非常感谢。