【问题标题】:ctypes inside virtualenv can't find dll in system32virtualenv中的ctypes在system32中找不到dll
【发布时间】:2015-11-06 02:36:39
【问题描述】:

我正在尝试在 virtualenv 中使用 python 模块 Shapely,但它无法加载一些具有依赖关系的 dll。

编辑

python 3.5 出现错误!库在 3.4 上运行良好

带二进制文件的轮子:http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

错误:

Traceback (most recent call last):
  File "C:\Python35\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "c:\games\ingress\mymissionssite\inteltools\IntelTools\update.py", line 9, in <module>
    from .regions import Regions
  File "c:\games\ingress\mymissionssite\inteltools\IntelTools\regions.py", line 5, in <module>
    import shapely.geometry.geo as geometry
  File "c:\Games\Ingress\MyMissionsSite\env\lib\site-packages\shapely\geometry\__init__.py", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "c:\Games\Ingress\MyMissionsSite\env\lib\site-packages\shapely\geometry\base.py", line 9, in <module>
    from shapely.coords import CoordinateSequence
  File "c:\Games\Ingress\MyMissionsSite\env\lib\site-packages\shapely\coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "c:\Games\Ingress\MyMissionsSite\env\lib\site-packages\shapely\geos.py", line 138, in <module>
    _lgeos = CDLL("geos_c.dll")
  File "C:\Python35\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

这表明 dll 检查器可以在 system32 目录中找到 dll

【问题讨论】:

标签: python windows virtualenv ctypes


【解决方案1】:

是的。 MSVCP140.dll missing 是对的。不知何故,我只安装了运行时的一部分。安装https://www.microsoft.com/en-us/download/details.aspx?id=48145 可以解决问题。

【讨论】:

    猜你喜欢
    • 2017-07-29
    • 2019-05-15
    • 2015-08-26
    • 2020-07-30
    • 2019-12-13
    • 1970-01-01
    • 1970-01-01
    • 2014-03-21
    • 2019-02-05
    相关资源
    最近更新 更多