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

add pip to pyproject.toml? #175

Closed
leggewie opened this issue Jan 23, 2021 · 6 comments
Closed

add pip to pyproject.toml? #175

leggewie opened this issue Jan 23, 2021 · 6 comments
Assignees
Labels
❔ question Further information is requested

Comments

@leggewie
Copy link
Contributor

leggewie commented Jan 23, 2021

As you know, I am running bionic. pip3 there is version 9.0.1. When verifying my bionic branch I ran into a problem installing 2 packages via "poetry install" (one of them being regex, I believe). The error message was to the effect that the corresponding wheel was in the wrong format and not supported on my platform. Via google I ended up (where else?) on stackoverflow where I learned that one possible root cause is an outdated pip3 and version 9 is certainly rusty. I've already installed version 20 in my user's directory, but I called poetry in a venv and apparently by default that calls the pip installed from bionic. One pip3 install --update pip inside the venv later and things went their merry way.

Question: With pip being special and all, I wonder if a versioned dependency on pip should be added to pyproject.toml.

@kdeldycke
Copy link
Owner

Thanks @leggewie for providing the detailed context.

You're right about pip being special. If it is the go-to solution to install packages in the Python ecosystem, it was not always the case. And might not be in the future. Adding pip is going to forces onto the user the choice of package manager. People gets very opinionated about package managers, and there are some alternatives out there: Conda, pipx, apt, ...

So unless we call code or functions implemented in pip, the Python package, there is no need to add pip as a direct dependency to our project.

That being said, we can still amend the documentation and installation instruction to provide guidance to new users on how to install the project in a particular environment (Bionic in your case).

@kdeldycke kdeldycke added question and removed bug labels Jan 23, 2021
@leggewie
Copy link
Contributor Author

Somehow, I don't like the idea of pushing this out to documentation. I'm sure there is a way within this project or possibly poetry to make the problem transparent to the user or throw a more meaningful error.

I am a seasoned debian/ubuntu admin and package maintainer with decades of experience, but my python foo is a bit more recent than that. If there is more than one python package manager (akin to apt/aptitude/dpkg/yum/dnf), I'd like to find out where the difference is in pip v9 vs v20 that triggers this problem.

@leggewie
Copy link
Contributor Author

leggewie commented Jan 23, 2021

gosh, poetry has almost 200 open PRs and several pages of open bugs with the word platform.

Yes, very overwhelming indeed. Referencing this bug that appears to be most closely related (I really have no idea ATM, though).

@leggewie
Copy link
Contributor Author

leggewie commented Jan 23, 2021

Again, I am not so well-versed with how python packages stuff. Is it possible for poetry to say that they need at least a certain version of pip? IOW, declare a versioned compile-time dependency? How about specifying alternative dependencies?

In Debian (are you on Debian, respectively a derivative?), I would specify "Depends: pip >= 123 | conda | pipx >= 345" in the debian/control file to solve this problem.

@leggewie
Copy link
Contributor Author

It turns out that I was using poetry the wrong way, apparently, by creating a venv, installing it there, activating the venv and then running poetry from the venv. Apparently, that's a no-no. I did this so as not to mess up the python packages installed via apt to /usr/lib/python3 and pip to ~/.local/ That's enough of a mess to deal with by itself.

Closing as invalid.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2021
@kdeldycke kdeldycke added ❔ question Further information is requested and removed question labels Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❔ question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants