1

Long post for one error I keep getting:

PC, Windows 10, I have used PyCharm, VS Code, Powershell for pip installations, virtual environments as well as normal.

I am trying to get the arcade library installed, so I can get to building a platform type game with a friend. Having done research on what libraries to use, we came across Arcade, looking perfect for our idea for the platformer.

https://api.arcade.academy/en/latest/examples/platform_tutorial/step_01.html

And

https://api.arcade.academy/en/latest/install/windows.html

Now here's the crux. I have followed all the steps, have tried installing it in various ways (virtual environments as well), but I keep getting the same error code (please continue reading after the error codes, as I've tried various solutions already):

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.

Having already tried to research this (and finding many questions for the shapely lib, as that's where it is coming from by the looks of it) and many, many different solutions, I keep still getting the same error.

I have tried installing shapely, but each line gives me the following error, all the way to version 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:

Solutions tried:

  • I have gone to the geos website, downloaded and installed OSGeo4W. This file is installed and exists on my C drive and has both dll files in it.
  • I've added several paths as well, directing to various places these dll files can now be found in as they are on my PC.
  • We have even looked in the geos.py file to figure out what it does and where it goes wrong. The code will error out and say it cannot find geos.dll in a folder where the actual file is.

So now I'm stuck, my friend and I have exhausted all possible solutions he and I could come up with or find to try and resolve it, and I am unable to find a way to code using arcade due to this geos.dll and geos_c.dll file errors.

  • 1
    Did you try these ones? `conda install -c conda-forge geos=3.7.1` and `conda install shapely` – razimbres Oct 29 '21 at 22:21
  • ``` conda install shapely Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: / Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed ``` plus 500 more lines of conflicts – GraceFoxDragon Oct 29 '21 at 22:51

2 Answers2

0

As it turns out, the Arcade lib documentation mentions using Python 3.7 on Windows 10, whereas my Miniconda was using Python 3.9 and my VS Code Python 3.10.

Using the Anaconda Prompt to install Python 3.7, then allowed me to install both arcade and shapely without any problems.

0

Shapely never upgraded to work on Windows with Python 3.10. The current versions of Arcade make Shapely optional and fall back to non-shapely Python code.

Paul Vincent Craven
  • 2,027
  • 3
  • 19
  • 24