python - ExGUtils 3.0 无法安装
问题描述
您好,我正在尝试在我的 Windows 计算机上的 VS 代码上的 python 环境中安装 ExGUtils 3.0。我不断收到一个错误,这是:
Collecting ExGUtils
Using cached ExGUtils-3.0.tar.gz (377 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_c5150aa0bfa44ea89ce16af14a8507f3\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_c5150aa0bfa44ea89ce16af14a8507f3\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Leo\AppData\Local\Temp\pip-pip-egg-info-8ujlwys6'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-install-0sbakymg\exgutils_c5150aa0bfa44ea89ce16af14a8507f3\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Leo\AppData\Local\Temp\pip-install-0sbakymg\exgutils_c5150aa0bfa44ea89ce16af14a8507f3\setup.py", line 29, in <module>
bla = raw_input("Compile C [Y/n]? ")
NameError: name 'raw_input' is not defined
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/af/e7/006322dd2e5d3644ac14b1e49c6c77bf1836598eacfb36ef2a96c85b85b3/ExGUtils-3.0.tar.gz#sha256=413cd9f84a8bbff9c1cee1388775a5cd9c7545e6bfb28502d988cf6b2de0515e (from https://pypi.org/simple/exgutils/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached ExGUtils-2.0.tar.gz (873 kB)
Building wheels for collected packages: ExGUtils
Building wheel for ExGUtils (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_ed75e0edba84415a97393b42b74dfabb\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_ed75e0edba84415a97393b42b74dfabb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Leo\AppData\Local\Temp\pip-wheel-q2fegjyw'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-install-0sbakymg\exgutils_ed75e0edba84415a97393b42b74dfabb\
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\pyexg.py -> build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\__init__.py -> build\lib.win-amd64-3.9\ExGUtils
running build_ext
building 'ExGUtils.uts' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for ExGUtils
Running setup.py clean for ExGUtils
Failed to build ExGUtils
Installing collected packages: ExGUtils
Running setup.py install for ExGUtils ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_ed75e0edba84415a97393b42b74dfabb\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_ed75e0edba84415a97393b42b74dfabb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Leo\AppData\Local\Temp\pip-record-bwzox5tu\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\include\site\python3.9\ExGUtils'
Complete output (11 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\pyexg.py -> build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\__init__.py -> build\lib.win-amd64-3.9\ExGUtils
running build_ext
building 'ExGUtils.uts' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_ed75e0edba84415a97393b42b74dfabb\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-0sbakymg\\exgutils_ed75e0edba84415a97393b42b74dfabb\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Leo\AppData\Local\Temp\pip-record-bwzox5tu\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\include\site\python3.9\ExGUtils' Check the logs for full command output.
WARNING: You are using pip version 21.1.3; however, version 21.3 is available.
You should consider upgrading via the 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe -m pip install --upgrade pip' command.
(.venv) PS C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace> python -m pip install ExGUtils
Collecting ExGUtils
Using cached ExGUtils-3.0.tar.gz (377 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_cea064063ecb48eda3e03df6cf8186f9\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_cea064063ecb48eda3e03df6cf8186f9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Leo\AppData\Local\Temp\pip-pip-egg-info-w1hiuf8f'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-install-da5a3nfv\exgutils_cea064063ecb48eda3e03df6cf8186f9\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Leo\AppData\Local\Temp\pip-install-da5a3nfv\exgutils_cea064063ecb48eda3e03df6cf8186f9\setup.py", line 29, in <module>
bla = raw_input("Compile C [Y/n]? ")
NameError: name 'raw_input' is not defined
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/af/e7/006322dd2e5d3644ac14b1e49c6c77bf1836598eacfb36ef2a96c85b85b3/ExGUtils-3.0.tar.gz#sha256=413cd9f84a8bbff9c1cee1388775a5cd9c7545e6bfb28502d988cf6b2de0515e (from https://pypi.org/simple/exgutils/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached ExGUtils-2.0.tar.gz (873 kB)
Building wheels for collected packages: ExGUtils
Building wheel for ExGUtils (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_15bec1f8cd874388bebb08e44962e7dc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_15bec1f8cd874388bebb08e44962e7dc\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Leo\AppData\Local\Temp\pip-wheel-7hbbnzp9'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-install-da5a3nfv\exgutils_15bec1f8cd874388bebb08e44962e7dc\
Complete output (11 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\pyexg.py -> build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\__init__.py -> build\lib.win-amd64-3.9\ExGUtils
running build_ext
building 'ExGUtils.uts' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for ExGUtils
Running setup.py clean for ExGUtils
Failed to build ExGUtils
Installing collected packages: ExGUtils
Running setup.py install for ExGUtils ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_15bec1f8cd874388bebb08e44962e7dc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_15bec1f8cd874388bebb08e44962e7dc\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Leo\AppData\Local\Temp\pip-record-9piz1prw\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\include\site\python3.9\ExGUtils'
cwd: C:\Users\Leo\AppData\Local\Temp\pip-install-da5a3nfv\exgutils_15bec1f8cd874388bebb08e44962e7dc\
Complete output (11 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\pyexg.py -> build\lib.win-amd64-3.9\ExGUtils
copying ExGUtils\__init__.py -> build\lib.win-amd64-3.9\ExGUtils
running build_ext
building 'ExGUtils.uts' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_15bec1f8cd874388bebb08e44962e7dc\\setup.py'"'"'; __file__='"'"'C:\\Users\\Leo\\AppData\\Local\\Temp\\pip-install-da5a3nfv\\exgutils_15bec1f8cd874388bebb08e44962e7dc\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Leo\AppData\Local\Temp\pip-record-9piz1prw\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Leo\Documents\Python setup VSCode\PythonWorkSpace\.venv\include\site\python3.9\ExGUtils' Check the logs for full command output.
我知道问题是我正在使用 python 3 where raw_input
is now input
,我不知道如何解决这个问题,希望能得到任何帮助。我能想到的唯一解决方案是为 Python 2 创建一个新环境,还有其他方法可以解决这个问题吗?
解决方案
正如您已经注意到的,该软件包似乎是在考虑 python 2x 的情况下编写的。由于这个库很小,你可以简单地从 pypi 下载源代码,解压并编辑 setup.py 中的行:
bla = raw_input("Compile C [Y/n]? ")
使其与python3兼容。然后python setup.py install
在源代码文件夹中运行。
请注意,您还有一个额外的错误:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
如果你想安装这个库的 C 后端(可选),你需要确保你安装了它。
推荐阅读
- sql - SQL - 计算整个表中不为空且不为空的所有单元格
- sql - 如何在字符串中的特定单词之后选择 Oracle SQL 中的子字符串?
- mysql - 如何使触发器的 DDL 与触发器代码保持一致?
- php - DOMDocument->loadHTMLFile() I/O 警告:加载外部实体失败,仅在被 ajax 调用时失败
- testng - 是否可以每次使用不同的@BeforeMethod 多次运行@Test testNG 注释?
- python - 使用 FastAPI TestClient 进行测试返回 422 状态码
- python - 当文本文件中出现单词时按下按钮
- javascript - posts.populate 不是函数
- javascript - React.js:为什么搜索过滤器不起作用?
- .htaccess - .htaccess 文件中的子域仅适用于索引