1

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?

Dustin Ingram
  • 20,502
  • 7
  • 59
  • 82
saga
  • 1,933
  • 2
  • 17
  • 44
  • It looks like you're having C extension code in your package; when building a wheel, it becomes platform-dependent, meaning that it can be only installed in distributions with same platform/ABI/interpreter type/interpterer version. If you want to build such a wheel for Linux, you have to obey PEP 513; take a look at [this question](https://stackoverflow.com/questions/47042483/) that has answers on how to build a `manylinux1` wheel using `auditwheel` or a MacOS wheel using `delocate`. – hoefling Aug 25 '18 at 10:45
  • A side note: don't forget you can use https://test.pypi.org if you want to test out whether your package is built & uploaded correctly. – hoefling Aug 25 '18 at 10:47

1 Answers1

0

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.

Steve Barnes
  • 27,618
  • 6
  • 63
  • 73
  • Yes it's just a xonsh script There are many other similar packages(https://pypi.org/search/?q=xontrib). I got it working btw. – saga Aug 25 '18 at 09:14
  • 1
    @saga Have you considered adding your own answer - it might be helpful to others. – Steve Barnes Aug 25 '18 at 11:22