Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIP Installation is broken #50

Open
jamesgeddes opened this issue Apr 5, 2023 · 7 comments
Open

PIP Installation is broken #50

jamesgeddes opened this issue Apr 5, 2023 · 7 comments
Assignees

Comments

@jamesgeddes
Copy link

When running

pip install pycups

The following is returned.

Collecting pycups
  Downloading pycups-2.0.1.tar.gz (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.0/63.0 kB 5.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycups
  Building wheel for pycups (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      In file included from cupsconnection.c:22:
      cupsconnection.h:26:10: fatal error: cups/http.h: No such file or directory
         26 | #include <cups/http.h>
            |          ^~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycups
  Running setup.py clean for pycups
Failed to build pycups
Installing collected packages: pycups
  Running setup.py install for pycups ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for pycups did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      [dir]/venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      In file included from cupsconnection.c:22:
      cupsconnection.h:26:10: fatal error: cups/http.h: No such file or directory
         26 | #include <cups/http.h>
            |          ^~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pycups

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

OS: Ubuntu 20.04.5 LTS
Python: 3.8.10

@jamesgeddes
Copy link
Author

Though it does not suggest this in the error message, the following is required as a prerequisite.

sudo apt-get install libcups2-dev

It would be tremendously helpful if this could be made more clear.

@jamesgeddes jamesgeddes mentioned this issue Apr 5, 2023
@zdohnal
Copy link
Member

zdohnal commented Apr 6, 2023

Hi,

thank you for reporting the issue!

Actually the dependency is mentioned in README file, but if you know how to set it in setup.py, it would be great if you sent a PR.

@zdohnal zdohnal closed this as completed Apr 6, 2023
@jamesgeddes
Copy link
Author

I do see now that it is mentioned in the documentation, however the expected behavior is that pip install should just work. I'll see if I can work out how to fix this.

@jamesgeddes
Copy link
Author

@zdohnal As the pip install is still broken, could this be reopened and assigned to me please?

@zdohnal
Copy link
Member

zdohnal commented Apr 11, 2023

Np, I closed the issue because I took it as solved by mentioning the dependency in README file, because I don't know a way how to solve it in pip (unless introducing some kind of configure/cmake solution, which will check the deps before the build, but IMO that's not a Python way of doing it).

@StarterCraft
Copy link

Not to mention that installing this on a Windows machine (e. g. for more comfortable development) seems completely impossible.

@zdohnal zdohnal changed the title Installation is broken PIP Installation is broken Apr 17, 2024
@zdohnal
Copy link
Member

zdohnal commented Apr 17, 2024

I have tried to solve this in 2.0.2a0 and 2.0.3 versions, but with no luck :( . Probably the project will have to be migrated to newer Python distributing ways...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants