1

I want to publish a project using pypi. Ideally I would like the installation to be:

sudo pip3 install ProjectName

The problem is, I get:

Could not find any downloads that satisfy the requirement itsdangerous (from ProjectName) Some insecure and unverifiable files were ignored (use --allow-unverified itsdangerous to allow).

If I firstly install the external requirements (itsdangerous and wspy in this case), then the installation completes.

Here is my requirements.txt:

requests>=2.10.0
six>=1.10.0
itsdangerous==0.24
ws4py==0.3.4

And here is the install_requires from setup.py:

install_requires=[
    "requests",
    "six",
    "ws4py",
    "itsdangerous"
]

One thing I think may cause the issue is that the requirements.txt is not included in MANIFEST.in, but I am not sure how to include it.

I am using https://testpypi.python.org/pypi/.

Basically, I have the same issue as described in this question. I do not really understand the accepted answer.

Community
  • 1
  • 1
giliev
  • 2,938
  • 4
  • 27
  • 47
  • what is with the --allow-unverified in there? – Paul Becotte Sep 22 '16 at 16:12
  • It's the message I receive when I try to install my published package using: sudo pip3 install MyProjectName – giliev Sep 22 '16 at 16:16
  • Why are you installing (polluting) on your system Python? You can create a virtualenv. See: http://stackoverflow.com/questions/5844869. – Laurent LAPORTE Sep 22 '16 at 16:16
  • @LaurentLAPORTE because the library will be used by other users and I thought it would be easier for installation this way. – giliev Sep 22 '16 at 16:18
  • Did you specify *where* to install those from? Pip requires a source for external packets. – MisterMiyagi Sep 22 '16 at 16:44
  • 1
    @MisterMiyagi no, I haven't. I thought pip will figure it out. When I enter *pip install itsdangerous* it installs without problems. Doesn't pip know how to find the dependencies? – giliev Sep 22 '16 at 16:47
  • right- `pip install itsdangerous` works fine, so I was wondering why you had `--allow-external --allow-unverified` in there? – Paul Becotte Sep 22 '16 at 17:19
  • 1
    @PaulBecotte It works. But when I try `pip install MyProject` and itsdangerous is one of the dependencies for `MyProject` it doesn't work. It throws the error mentioned in the question. – giliev Sep 22 '16 at 17:21
  • Could we try? What's your `ProjectName` real name? Is your project currently on pypi? – Laurent LAPORTE Sep 22 '16 at 19:40
  • Do you succeed to install your `ProjectName` app in a fresh virtualenv? I'm suspecting clashes with your system Python. – Laurent LAPORTE Sep 22 '16 at 19:44
  • Can you update your question with a copy of your `~/.config/pip/pip.conf` (without sensible info). Which version of `pip` do you use. What’s `pip3`, an alias? – Laurent LAPORTE Sep 22 '16 at 19:47
  • Since pip v8.0.0, `--allow-unverified` is a no-op. See: https://pip.pypa.io/en/stable/news/?highlight=--allow-unverified%20#release-notes – Laurent LAPORTE Sep 22 '16 at 19:50
  • I added full list of requirements. `requests` and `six` install successfully. `itsdangerous` and `ws4py` cannot install. Here is the error message: `Some externally hosted files were ignored (use --allow-external ws4py to allow).` – giliev Sep 22 '16 at 21:10
  • Not sure if it's important, but I am using https://testpypi.python.org/pypi/ – giliev Sep 22 '16 at 21:12
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/123987/discussion-between-giliev-and-laurent-laporte). – giliev Sep 22 '16 at 21:14
  • I added link to a similary question. That's exactly what I want to achieve. – giliev Sep 22 '16 at 21:47

1 Answers1

2

To install

Update your ~/.config/pip/pip.conf and/or /etc/pip.conf.

Append the test repository to the --find-links option:

[install]
find-links =
    https://pypi.python.org/pypi
    https://testpypi.python.org/pypi

The order is important…

See the Cofiguration topic in the documentation.

To register and upload

See the TestPypi wiki page.

Laurent LAPORTE
  • 21,958
  • 6
  • 58
  • 103
  • The solution didn't work well for me (maybe I did something wrong), but I got the idea. Some of the packages weren't available in TestPypi. I tried on pip, and everything worked well there. – giliev Oct 19 '16 at 11:49