系统/版本信息:
Datacenter
我试图使用以下命令安装execsql (1.72)的最新版本:
pip install execsql当我运行代码时,结果是以下单元格。
> Collecting execsql
> Using cached execsql-1.72.2.tar.gz (115 kB)
> ERROR: Command errored out with exit status 1:
> command: /usr/bin/python -c 'import sys, setuptools, tokenize;
> sys.argv[0] = '"'"'/tmp/pip-install-UoDS2j/execsql/setup.py'"'"';
> __file__='"'"'/tmp/pip-install-UoDS2j/execsql/setup.py'"'"';f=getattr(tokenize,
> '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"',
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'
> egg_info --egg-base /tmp/pip-pip-egg-info-LDfNrk
> cwd: /tmp/pip-install-UoDS2j/execsql/
> Complete output (5 lines):
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/tmp/pip-install-UoDS2j/execsql/setup.py", line 3, in <module>
> with open('README.md', encoding='utf-8') as f:
> TypeError: 'encoding' is an invalid keyword argument for this function
> ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py
> egg_info Check the logs for full command output.这是Ubuntu和Python的一个新实例。我将非常感谢在这个问题上的帮助,因为我无法在网上找到任何文件,指出我的正确方向。以下是我为解决这一问题已经采取的步骤:
pip install -U setuptoolspip install --upgrade setuptools wheel pip install python-language-server发布于 2020-05-14 07:36:35
误差
具有open('README.md',编码=‘utf-8’)为f:
TypeError:“编码”是此函数的无效关键字参数
因为代码与Python2不兼容而发生。我可以在没有此错误的情况下安装execsql的最新版本是1.47.0。
https://stackoverflow.com/questions/61790540
复制相似问题