[英]pip install arcade keeps giving "Could not find module 'geos_c.dll' (or one of it dependencies). geos.dll and geos_c.dll unfindable
我不斷收到一個錯誤的長篇文章:
PC,Windows 10,我用過PyCharm,VS Code,Powershell pip安裝,虛擬環境也正常。
我正在嘗試安裝街機庫,這樣我就可以和朋友一起構建平台類型的游戲了。 在研究了要使用的庫之后,我們發現了 Arcade,它看起來非常適合我們的平台游戲想法。
https://api.arcade.academy/en/latest/examples/platform_tutorial/step_01.html
和
https://api.arcade.academy/en/latest/install/windows.html
現在是症結所在。 我已按照所有步驟進行操作,嘗試以各種方式安裝它(也包括虛擬環境),但我一直收到相同的錯誤代碼(請在錯誤代碼后繼續閱讀,因為我已經嘗試過各種解決方案):
PS C:\Users\Grace\AppData\Local\Programs\Python\Python310> pip install arcade
Collecting arcade
Using cached arcade-2.6.3-py3-none-any.whl (39.2 MB)
Collecting shapely==1.7.1
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Grace\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\pip-install-labiwb90\\shapely_c43a03848a5e4619a6d0372e22fc4a7c\\setup.py'"'"'; __file__='"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\pip-install-labiwb90\\shapely_c43a03848a5e4619a6d0372e22fc4a7c\\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\Grace\AppData\Local\Temp\pip-pip-egg-info-0b2ppic9'
cwd: C:\Users\Grace\AppData\Local\Temp\pip-install-labiwb90\shapely_c43a03848a5e4619a6d0372e22fc4a7c\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Grace\AppData\Local\Temp\pip-install-labiwb90\shapely_c43a03848a5e4619a6d0372e22fc4a7c\setup.py", line 85, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Grace\AppData\Local\Temp\pip-install-labiwb90\shapely_c43a03848a5e4619a6d0372e22fc4a7c\shapely\_buildcfg.py", line 205, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Users\Grace\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/42/f3/0e1bc2c4f15e05e30c6b99322b9ddaa2babb3f43bc7df2698efdc1553439/Shapely-1.7.1.tar.gz#sha256=1641724c1055459a7e2b8bbe47ba25bdc89554582e62aec23cb3f3ca25f9b129 (from https://pypi.org/simple/shapely/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
已經嘗試對此進行研究(並為 shapely lib 找到許多問題,因為它的外觀就是它的來源)和許多許多不同的解決方案,但我仍然遇到相同的錯誤。
我已經嘗試安裝 shapely,但每一行都給我以下錯誤,一直到版本 1.5.9.tar.gz
PS E:\GAME\project> pip install shapely
Collecting shapely
Using cached Shapely-1.8.0.tar.gz (278 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'e:\my virtual env\this one\scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\p
ip-install-sly8ntwk\\shapely_e4ed214432664ba8b60621c78133751b\\setup.py'"'"'; __file__='"'"'C:\\Users\\Grace\\AppData\\Local\\Temp\\pip-install-sly8ntwk\\shapely_e4ed
214432664ba8b60621c78133751b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools impo
rt setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Grace\AppData\Local\Temp\pip-pip-egg-info-a5sb9s6p'
cwd: C:\Users\Grace\AppData\Local\Temp\pip-install-sly8ntwk\shapely_e4ed214432664ba8b60621c78133751b\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Grace\AppData\Local\Temp\pip-install-sly8ntwk\shapely_e4ed214432664ba8b60621c78133751b\setup.py", line 74, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Grace\AppData\Local\Temp\pip-install-sly8ntwk\shapely_e4ed214432664ba8b60621c78133751b\shapely\_buildcfg.py", line 204, in <module>
lgeos = CDLL("geos_c.dll")
File "C:\Users\Grace\AppData\Local\Programs\Python\Python310\lib\ctypes\__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'geos_c.dll' (or one of its dependencies). Try using the full path with constructor syntax.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1c/0c/454c80f71bd5ece52fb06d2905bf956b9122f4be539d5ae5df4b10dd3e14/Shapely-1.8.0.tar.gz#sha256=f5307ee14ba41
99f8bbcf6532ca33064661c1433960c432c84f0daa73b47ef9c (from https://pypi.org/simple/shapely/) (requires-python:>=3.6). Command errored out with exit status 1: python setu
p.py egg_info Check the logs for full command output.
Using cached Shapely-1.7.1.tar.gz (383 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
解決方案嘗試:
所以現在我被困住了,我和我的朋友已經用盡了他和我可以想出或找到嘗試解決它的所有可能的解決方案,而且由於這個 geos.dll 和我無法找到使用街機編碼的方法geos_c.dll 文件錯誤。
事實證明,Arcade lib 文檔提到在 Windows 10 上使用 Python 3.7,而我的 Miniconda 使用的是 Python 3.9 和我的 VS Code Python 3.10。
使用 Anaconda Prompt 安裝 Python 3.7,然后讓我可以毫無問題地安裝 Arcade 和 shapely。
Shapely 從未升級到 Windows 和 Python 3.10。 Arcade 的當前版本使 Shapely 成為可選的,並退回到非 shapely Python 代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.