jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
375 stars 59 forks source link

Error When Installing with "Local" libgphoto2 #171

Open JoeWise opened 7 months ago

JoeWise commented 7 months ago

What version of Python are you using? 3.7

What version of libgphoto2 have you installed? 2.5.31

How have you installed (or attempted to install) python-gphoto2? I have previously installed successfully using the Binary wheel method

I am developing on a Raspberry Pi Zero that is currently on Buster, where the latest version of libgphoto2 available via apt install is 2.5.22. However, I need to use version 2.5.31. I followed the instructions in the INSTALL.rst document in this repository regarding installing pythong-gphoto2 with a "Local" libgphoto2. I was able to download the source for 2.5.31 and build it locally. For the prefix option when running the configure script I chose /home/pi/libgphoto2-2.5.31/build as the location. However, when I go to run the pip command to install python-gphoto2 I get an error.

Here is the output.

pi@raspberrypi:~ $ GPHOTO2_ROOT=/home/pi/libgphoto2-2.5.31/build pip3 install gphoto2 --user --no-binary :all:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting gphoto2
  Using cached https://files.pythonhosted.org/packages/d9/e0/03167246c2d32d2b646cbd7f1bf424e3e0b52c319d5cc2d72da3998ed141/gphoto2-2.5.0.tar.gz
  Installing build dependencies ... error
  Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-mhag9ljl --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- "setuptools >= 59.6" toml:
  Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
  Collecting setuptools>=59.6
    Using cached https://files.pythonhosted.org/packages/dc/98/5f896af066c128669229ff1aa81553ac14cfb3e5e74b6b44594132b8540e/setuptools-68.0.0.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'error'
    Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9w8txykg --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple --extra-index-url https://www.piwheels.org/simple --:
    ERROR: You must give at least one requirement to install (see "pip help install")

    ----------------------------------------
  Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-9w8txykg --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple --extra-index-url https://www.piwheels.org/simple --" failed with error code 1 in None

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-mhag9ljl --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- "setuptools >= 59.6" toml" failed with error code 1 in None

My understanding was that providing the :all: satisfies a requirement, but it doesn't seem to work. Any insight into fixing this issue is greatly appreciated!

jim-easterbrook commented 7 months ago

It appears to be trying to install a dependency called :. This fails, not surprisingly.

Try installing the build dependencies first with pip3 install gphoto2 --user "setuptools >= 59.6", "toml", then install python-gphoto2 with the same command as before.

JoeWise commented 6 months ago

Thanks Jim, installing all of the build dependencies separately fixed my issue.