在Windows 10 OS中,当我运行python项目时出现错误
ModuleNotFoundError: No module named 'tzwhere'
我尝试在tzwhere上安装
pip install tzwhere
ERROR: Command errored out with exit status 1:
command: 'c:\users\raj\envs\py1\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\temp\\pip-install-3lryfis_\\shapely\\setup.py'"'"'; __file__='"'"'C:\\temp\\pip-install-3lryfis_\\shapely\\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 pip-egg-info
cwd: C:\temp\pip-install-3lryfis_\shapely\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\temp\pip-install-3lryfis_\shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\temp\pip-install-3lryfis_\shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "c:\users\raj\appdata\local\programs\python\python37\Lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
我的代码:
from tzwhere import tzwhere
tzwhere = tzwhere.tzwhere()
我需要在Windows命令提示符下安装tzwhere
答案 0 :(得分:-1)
您是否将pip安装在正确的位置?
如果您使用的是Windows,则必须进入python37文件夹,然后找到脚本文件夹,然后在位置为“ cmd”的文本栏中键入内容,然后键入“ pip3 install tzwhere”(或使用常规的“点子”,如果您没有pip3)。