我正在尝试修复错误:
import version
ModuleNotFoundError: No module named 'version'
所以我尝试pip install version
了以下错误:
from itertools import izip_longest
ImportError: cannot import name 'izip_longest'
所以通过不同的论坛,我意识到我需要使用这个导入参数更新文件import izip_longest
并将其更新为import zip_longest
.
但该文件version.py
似乎是一个临时文件,我无法在 Windows 10 中访问它。
C:\TruCalvin\testsfolder>pip install version
Collecting version
Using cached https://files.pythonhosted.org/packages/fd/b6/fa3b2c859d4d8817a106e4272029d78a2afbca0a27139997a4e5515bbf60/version-0.1.1.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\Tru~1\AppData\Local\Temp\pip-install-d5jk1cru\version\setup.py", line 4, in <module>
from version import __version__
File "C:\Users\Tru~1\AppData\Local\Temp\pip-install-d5jk1cru\version\version.py", line 2, in <module>
from itertools import izip_longest
ImportError: cannot import name 'izip_longest'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Tru~1\AppData\Local\Temp\pip-install-d5jk1cru\version\
如何缓解此问题并编辑文件以便pip install version
成功运行?
提前致谢。