Unable to install Pyproj on a raspberry pi zero 2W (debian bullseye)

51 views Asked by At

I tried to install Pyproj=3.0.0 and can't get it to work. The most weird thing is, that I was able to install it on a Raspi 1 B in the past. Sadly I can't remember how I did it and now I'm not able to to proceed with my project.

If I'm running the pip install pyproj==3.0.0 (I'm using pyproj=3.0.0, since I have Proj 7.2.1 installed). This is the error code I currently always get:

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyproj==3.0.0
  Using cached pyproj-3.0.0.tar.gz (663 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmp7mdmsmo2_in_process.py get_requires_for_build_wheel /tmp/tmpmz1i1vfl
       cwd: /tmp/pip-install-fsolsstg/pyproj_5250f99ff61c43df8f5d4f8e9a2bd582
  Complete output (30 lines):
  <string>:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  PROJ_DIR is set, using existing proj4 installation..
  
  Traceback (most recent call last):
    File "/tmp/tmp7mdmsmo2_in_process.py", line 280, in <module>
      main()
    File "/tmp/tmp7mdmsmo2_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmp7mdmsmo2_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-anhs8c63/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-anhs8c63/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-anhs8c63/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 507, in run_setup
      super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-anhs8c63/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 224, in <module>
    File "<string>", line 155, in get_extension_modules
    File "<string>", line 22, in get_proj_version
    File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/usr/lib/python3.9/subprocess.py", line 505, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/proj'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/44/b8/a645507e4188333e15da29a445102ce2621d69788c586b0625ccd16f8a63/pyproj-3.0.0.tar.gz#sha256=539e320d06e5441edadad2e2ab276e1877445eca384fc1c056b5501453d433c2 (from https://pypi.org/simple/pyproj/) (requires-python:>=3.6). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp7mdmsmo2_in_process.py get_requires_for_build_wheel /tmp/tmpmz1i1vfl Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pyproj==3.0.0
ERROR: No matching distribution found for pyproj==3.0.0

I already tried to set the PROJ_DIR variable to Path, but it seems like im doing something wrong, because when I run the export PROJ_DIR=$PATH

echo $PATH shows me: PROJ_DIR

Means I can't use pip any more.

Sadly I'm a complete RASPI beginner and don't know what I'm really doing. What can I try next?

0

There are 0 answers