vitiral
vitiral

Reputation: 9210

pip cannot find module that is in pypi

I have created a python module, i2cdev.

When I try to install it through pip, I get that it cannot find it:

$ pip3 search "i2cdev"  # finds it fine
i2cdev                    - Simple I2C Library for linux
$ pip3 install i2cdev
Collecting i2cdev
  Could not find any downloads that satisfy the requirement i2cdev
  No distributions at all found for i2cdev

What is going on?

Upvotes: 1

Views: 1058

Answers (2)

itzMEonTV
itzMEonTV

Reputation: 20339

You have to setup download link for the tarball/zip file which is uploaded.You can check it by

http://pypi.python.org/simple/<package name>

Because pip searches in this above url.If There is no download links, You have to add download_link as metadata.That is something like

in setup.py

setup(...,
     download_url = 'http://pypi/path/to/package.tar.gz',

     )

I found out, your's is

https://pypi.python.org/packages/source/i/i2cdev/i2cdev-1.2.4.tar.gz

Upvotes: 2

vitiral
vitiral

Reputation: 9210

wow, I'm an idiot. Apparently you have to use setup.py sdist upload to actually upload the code onto python. I thought just registering it was enough.

Upvotes: 4

Related Questions