系统/版本信息:
我正在尝试使用以下命令安装最新版本的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 setuptools
pip install --upgrade setuptools wheel
pip install python-language-server
错误
与open('README.md',encoding ='utf-8')as f:TypeError:“ encoding”是此函数的无效关键字参数]
因为代码与Python 2不兼容而发生。我可以在没有该错误的情况下安装的execsql
的最新版本为1.47.0。