【问题标题】:pip install pyautogui errors in terminal终端中的 pip install pyautogui 错误
【发布时间】:2021-12-20 20:06:49
【问题描述】:

当我尝试导入 pyautogui 时,它说找不到模块并在命令行中安装它:

命令

pip3 install pyautogui

终端响应

Command "D:\pythonp\venv\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\hp\\AppData\\Local\\Temp\\pip-install-1zr0j9qn\\Pillow\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.re
ad().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\hp\AppData\Local\Temp\pip-record-gwxfcxoi\install-record.txt --single-version-externally-managed --compile --install-
headers D:\pythonp\venv\include\site\python3.8\Pillow" failed with error code 1 in C:\Users\hp\AppData\Local\Temp\pip-install-1zr0j9qn\Pillow\

【问题讨论】:

  • 错误显示模块 Pillow 存在一些问题 - 也许您将不得不重新安装模块 Pillow
  • 这与 Pillow 无关。只是我的python文件在虚拟环境之外

标签: python pip pyautogui


【解决方案1】:

仔细查看项目周围的所有内容后,我意识到要让导入工作,python 文件应该位于 venv 文件夹中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-25
    • 2018-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-22
    • 2016-04-29
    • 1970-01-01
    相关资源
    最近更新 更多