Why wouldn't this project I published to PyPI install with pip? - python

I've published a project to PyPI for the first time (https://pypi.org/project/xontrib-autojump/). But I get the following error when I try to install the project with this pip command:
$ pip install xontrib-autojump --user
Collecting xontrib-autojump
Could not find a version that satisfies the requirement xontrib-autojump (from versions: 0.1.linux-x86_64, 0.2.linux-x86_64, 0.3.linux-x86_64, 0.4.linux-x86_64)
No matching distribution found for xontrib-autojump
This project does appear when I run pip search xontrib-autojump:
$ pip search xontrib-autojump
xontrib-autojump (0.4) - autojump support for xonsh
...
Why can't I install this package with pip?

There are a number of possible problem areas - the main one is that it looks to me that you have not followed the naming convention needed to specify which python version the download is suitable for.
It is also a very good idea to set the metadata as this assist with finding packages.
The Packaging Tutorial is very helpful on this. It is also recommend that you test the upload and install process using the test instance of pypi.
The other big problem st that you "package" does not contain any python code and is not a python package in any way shape or form.

Related

pip install package still not following dependency links

I'm having serious trouble with using setup.py to pip install my package which also has dependency links. I have read this answer and this one thoroughly and none of the answers including the accepted ones help.
Here is the setup.py for the package trying to install.
Basically, it reads the requirements.txt to fill install_requires and dependency_links, most of the rest of the code is boilerplate from cookie-cutter. requirements.txt has a private github repo in it which is causing the issues. e.g. git+https://${GITHUB_OAUTH_TOKEN}#github.com/jmerkow/pripy.git#egg=pripy
When I run pip install -r requirements.txt everything works great, it installs the private repository. However, if I try to install using pip install . --process-dependency-links, I get this error:
Could not find a version that satisfies the requirement pripy (from mypackage==<sha>) (from versions: )
No matching distribution found for pripy (from mypackage==<sha>)
If I take off the #egg=xxx from the link in requirements, the private repo package is completely ignored by pip install . but not by pip install -r requirements.txt.
I have confirmed that dependency_links contains 'git+https://<actual-token>#github.com/jmerkow/pripy.git#egg=pripy' and that install_requires includes 'pripy'
How do you get setup to properly Is this a problem with the sub-package? setup.py in that repo is done pretty much the same, except there are no private links.
Ugh, this always happens. I put in all the work to the question, then I figure it out myself.
The issue is two things, first, all dependeny_links need to have a version, second to pull the version from the requirements file properly you need to do some magic on the string.
Comparing to the above setup.py, I changes the way requirements are added to the two lists (updated here). Then add the version to #egg=xxx on the link e.g.
git+https://${GITHUB_OAUTH_TOKEN}#github.com/jmerkow/pripy.git#egg=pripy-0.
Now setup.py will parse that file, take the egg version info, convert it to a pip version (basically replace the first '-' with an '==') for the install_requires, and you're good to go.

pypi package published but can't download

I have here a package on pypi that was published by command line, but no-one can download it (except on the laptop I packaged it up on):
pip install webdriver_chauffeur
Collecting webdriver_chauffeur
Could not find a version that satisfies the requirement webdriver_chauffeur (from versions: )
No matching distribution found for webdriver_chauffeur
pip install webdriver-chauffeur
Collecting webdriver-chauffeur
Could not find a version that satisfies the requirement webdriver-chauffeur (from versions: )
No matching distribution found for webdriver-chauffeur
It is here https://pypi.python.org/pypi?%3Aaction=pkg_edit&name=webdriver_chauffeur
Pretty sure I followed this one https://axiacore.com/blog/basic-steps-publish-python-package/
Why is this package not installable?
I maintain a package on pypi and just hit this issue. I resolved it by hitting "update release" on the pypi version page of my package. If this problem persists you might consider letting the package maintainer know about the workaround.
I know it's an old thread, but I ran into a similar issue and this thread popped up on Google.
I faced the same error message. The problem was, that I set a Python version constraint of >=3.9. because that's the version I develop in. However, the environment where I tried to run pip install <...> was using Python 3.7. By relaxing the constraint in setup.py (or pyproject.toml in my case) the issue was resolved.
Dozens of people have the same issue, it seems pypi isn't stable and you should run your own pip server to use your packages

Error when using pip install: "Could not find a version that satisfies the requirement <package-name>"

I'm trying to install django-trumbowyg https://github.com/sandino/django-trumbowyg to my app
When I did pip install django-trumbowyg, it returned this error:
Could not find a version that satisfies the requirement django-trumbowyg (from versions: )
No matching distribution found for django-trumbowyg
Does anyone know what this means? And how I can fix it?
As https://pypi.python.org/pypi/django-trumbowyg#downloads shows, there's only a binary package for Python2 at PyPI.
So, you have to install the package directly from the official sources as pointed out by Rishav in the meantime.
Then ask the developer to upload a source package to PyPI and/or build the wheel as universal.
You may also get this error if your company firewall doesnt allow any package from external source. you might need to add a proxy in that case.
for example: pip install django-trumbowyg --proxy=proxy.companydomain.com:

Can't figure out how to install Python package decoder.py

Python n00b here trying to install decoder.py via pip.
I see it exists when I search for it
$ pip search decoder.py
decoder.py (1.5XB) - Cross-platform Python module for decoding compressed audio files
But i can't seem to install it.
$ pip install decoder.py
Collecting decoder.py
Could not find a version that satisfies the requirement decoder.py (from versions: )
No matching distribution found for decoder.py
$ pip install decoder.py==1.5XB
Collecting decoder.py==1.5XB
Could not find a version that satisfies the requirement decoder.py==1.5XB (from versions: )
No matching distribution found for decoder.py==1.5XB
Any ideas?
This package doesn't provide any downloadable source code on PyPI.
You can download it from http://www.brailleweb.com/cgi-bin/python.py (this link was provided by authors on pypi, proceed with caution).
Author of decoder.py here. :D
I am sorry for inconvenience. pip was able to grab decoder.py from brailleweb.com before. It was unable to install it though because I didn't provide a setup script. I didn't do it primarily because people might like to choose which external decoders they would like to use and perhaps don't want to install them into their's Python site-packages directory on Windows.
So I settled for manual installation instead. You aren't first who complained about it and that's why next version will have the setup script at least.
The new version is coming out soon. I am sorry to say development is slower than I anticipated but new version will be ready sooner or later. :D
Cheers!

How to download or install Gitlib as a standalone library with recent versions of pip?

This is a very simple problem, but I’m completely stuck on how to solve it. I couldn’t even found a way for just downloading.
The website don’t give anything for downloading it outside pypi and without smug.
$ pip install --allow-external gitlib gitlib
Collecting gitlib
Could not find a version that satisfies the requirement gitlib (from versions: )
Some insecure and unverifiable files were ignored (use --allow-unverified gitlib to allow).
No matching distribution found for gitlib
Using the required options doesn’t solve the problem.
$ pip install --allow-all-external --allow-unverified gitlib gitlib==0.5
Collecting gitlib==0.5
Could not find a version that satisfies the requirement gitlib==0.5 (from versions: )
No matching distribution found for gitlib==0.5
Pypi is only a list of registered projects -- if the package is listed at a download URL, you will need to follow that path to get the actual code to install.
In your case, you could git clone or pip install from git://mcnabbs.org/smug.git. If there's issues cloning or downloading, that's not something anyone here would be able to help you out with -- the package maintainer has decided to self-host his code.
More generally, pip interacts with pypi. Pypi is a package index for code that is not in the standard library. Much of this code is third-party/non-official. It's important to note that there is no promise of quality, functionality, or ability to install this code directly from pip.
In the case of "Gitlab" as per pypi, there's no promise that the code is actually true to its marketing of being a "Pythonic low-level Git library", there's no guarantee that the download URL is direct (or correct or even working), and it's a perfect example of the value of knowing that this information is maintained by the person that registered that package on pypi.

Categories