python - pip安装包出现错误 "Could not install packages due to an EnvironmentError"

标签 python

我在Pycharm中安装ansible模块时,出现以下错误:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\22946\\AppDat
a\\Local\\Temp\\pip-install-owwfux38\\ansible_bf2fa499f2d34802a4db896d6c1f85bc\\ansible_collections/amazon/aws/tests/unit/mo
dules/placebo_recordings/aws_direct_connect_connection/associations_are_not_updated/directconnect.DescribeConnections_1.json
'

软件版本如下:

  • python:Python 3.8.5

请帮我解决这个问题。谢谢。

最佳答案

Windows 的最大路径长度为 260 个字符。这就是它抛出错误的原因。 解决方案: 将软件包安装在路径较短的文件夹中。 帮助您消除最大路径错误。请按照提供的链接进行操作。 Follow link

关于python - pip安装包出现错误 "Could not install packages due to an EnvironmentError",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65351665/

相关文章:

python - tf.data.数据集 : Split and Turn String into Array of Integers

python - 从 windows .bat 文件运行 python 代码

python - 使用 shutil 模块将文件移动到当前目录

python - 用 pandas 在 excel 中给单元格着色

javascript - 如何使用pyqt评估javascript

python - linux : during downloading anaconda jupyter i got these errors

python - 保持 numpy 中比率的准确性

Python Pandas df,将货币金额中的 $、M 和 K 替换为 int 的最佳方法

python - 匹配列表中的项目 - Python

python - 在选择图像轮廓时如何避免对图像(条形图)进行分组?