question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with installing package that doesn’t use setup.py

See original GitHub issue

I’m having problems getting a package installed that doesn’t use a setup.py file. Only a setup.cfg file. I’ve made sure I’m using the most recent mach-nix & pypi-deps-db versions.

This is the error message that I’m seeing:

> Mach-nix version: master
> Python: 3.10.3
> Cause: Requirements conflict: django-phonenumber-field (<SpecifierSet('==6.1.0')>,)
> The requirements which caused the error:
>   django-phonenumber-field (<SpecifierSet('==6.1.0')>,)
>
> The given requirements might contain package versions which are not yet part of the dependency DB
> currently used. The DB can be updated by specifying 'pypiDataRev' when importing mach-nix.
> For examples see: https://github.com/DavHau/mach-nix/blob/master/examples.md
>

I’ve looked through lots of places & can see the package & correct version listed in pypi-deps-db but it’s listed under sdist-errors with this message:

"27": "IOError: [Errno 2] No such file or directory: 'setup.py'",
"36": "FileNotFoundError: [Errno 2] No such file or directory: 'setup.py'",

I’m sorry that I don’t know anything about Python setup & package distribution but I gather the setup.cfg only style is a newer way to install things.

Looking at older versions of django-phonenumber-field I can see in the past the package did have setup.py:

https://github.com/stefanfoulis/django-phonenumber-field/blob/5.2.0/setup.py

Should this build format be supported? Any thoughts or helpful tips? Thanks!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
exarkuncommented, Jul 1, 2022

Indeed it is not the case. mach-nix doesn’t know how to extract metadata from a PEP 517 package (roughly a package using pyproject.toml) and so it doesn’t consider such packages when trying to do dependency resolution.

0reactions
chaoflowcommented, Oct 12, 2022

There are plenty of packages affected by this.

With https://github.com/DavHau/pypi-deps-db/blob/99323880924a90acd689a4f23b56551d06d3f780

$ grep -c -R "No such file or directory: 'setup.py'" /nix/store/zwj5iqlnh22nc8dnwb6kv58jhpiswfl8-pypi-deps-db/sdist-errors/ |cut -d: -f2 |paste -sd+ | bc
42006
Read more comments on GitHub >

github_iconTop Results From Across the Web

setup.py don't installing the requirements - Stack Overflow
The reason for this error is that the setup.py imports from the package. This means that python will try importing the library while ......
Read more >
Why you shouldn't invoke setup.py directly - Paul Ganssle
One major problem with this approach, though, is that every Python package must use distutils and only distutils — there was no standard...
Read more >
Please do not remove setup.py install as it is needed ... - GitHub
We need a command that puts files in a directory we can use. We build distribution packages, and would really like to avoid...
Read more >
Installing Python Modules (Legacy version) — Python 3.11.1 ...
The “prefix scheme” is useful when you wish to use one Python installation to perform the build/install (i.e., to run the setup script),...
Read more >
How to Package Python dependencies with PIP setuptools
python -m pip install –upgrade pip setuptools. If you get a permissions error, instead of using sudo, consider creating a virtual ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found