python - 在 pyautogui 安装期间出现错误“TypeError:'encoding' is an invalid keyword argument for this function”
问题描述
我想pyautogui, openpyxl
在没有连接到互联网的机器上安装 Python。
在具有互联网连接的计算机上,我打开命令行并执行以下命令。
pip download pyautogui openpyxl
将所有下载的文件复制到目标机器,然后安装
pip install ...
其中... 表示所有下载的文件。都在一条线上。
执行此操作时出现以下错误-
with open('README.md', 'r', encoding='utf-8') as fh:
TypeError: 'encoding' is an invalid keyword argument for this function
C:\Temp\DSNImport>cd "C:\Temp\DSNImport\picu\python libraries"
C:\Temp\DSNImport\picu\python libraries>pip install openpyxl-2.6.2.tar.gz PyAutoGUI-0.9.44.tar.gz et_xmlfile-1.0.1.tar.gz jdcal-1.4.1-py2.py3-none-any.whl Pillow-6.0.0.tar.gz PyGetWindow-0.0.5.tar.gz PyRect-0.1.4.tar.gz PyScreeze-0.1.21.tar.gz
Processing c:\temp\dsnimport\picu\python libraries\openpyxl-2.6.2.tar.gz
Processing c:\temp\dsnimport\picu\python libraries\pyautogui-0.9.44.tar.gz
Processing c:\temp\dsnimport\picu\python libraries\et_xmlfile-1.0.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): et-xmlfile==1.0.1 from file:///C:/Temp/DSNImport/picu/python%20libraries/et_xmlfile-1.0.1.tar.gz in c:\programdata\anaconda2\lib\site-packages
Processing c:\temp\dsnimport\picu\python libraries\pillow-6.0.0.tar.gz
Processing c:\temp\dsnimport\picu\python libraries\pygetwindow-0.0.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\superu~1\appdata\local\temp\pip-bbamct-build\setup.py", line 10, in <module>
with open('README.md', 'r', encoding='utf-8') as fh:
TypeError: 'encoding' is an invalid keyword argument for this function
---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in c:\users\superu~1\appdata\local\temp\pip-bbamct-build\
C:\Temp\DSNImport\picu\python libraries>
如何安装“pyautogui”?
解决方案
推荐阅读
- java - 正则表达式需要将数字匹配到小数点后 2 位,但允许 1 位数字为零
- java - 在扑克中从手中取出卡片?
- web-scraping - 将 JSON RPC 请求解码为合约
- java - Intellij 在集成测试之前创建 docker 映像
- ansible - Ansible 添加多个列表变量以形成一个主列表
- python - 在 Python 中使用 minidom 解析嵌套的 XML 结构
- sql - PostgreSQL 中别名列的总和
- python - 使用标记/分页从 boto3 返回整个 dms 数据
- java - 如何防止 JPA/Hibernate 尝试从(只读)数据库视图映射的 Map 属性中删除?
- php - 离开woocommerce网站时如何清洁购物车