Sid
Sid

Reputation: 49

Pipenv install fails to install sub dependencies

Describe you environment

  1. OSX (MAC)
  2. Python version: 2.7.10
  3. Pipenv version: 8.2.6

Issue

1) setup.py inside invocations repo -> installing CaaS package :

```

install_requires=[
    'CaaS>=1.0'
  ],

  dependency_links=[
    'https://<private_repo>#egg=CaaS-1.0'
  ],

``` 2) Installing invocations in a virtualenv

python setup.py install

3) Valdiating CaaS installed correctly. ```

(test_1) c4b301cf5d25:invocations quj291$ pip freeze
CaaS==1.0

```

So far everything works.

4) Created a Pipfile

```

[requires]
python_version = '2.7'

[packages]
invocations = { git = 'git://<private-repo>/invocations',  ref = 'master' }

```

5) Fails to install invocations because CaaS package cannot be found: pipenv install

```

Collecting CaaS>=1.0 (from invocations)

  Could not find a version that satisfies the requirement CaaS>=1.0 (from invocations) (from versions: )
No matching distribution found for CaaS>=1.0 (from invocations)

```

6) Tried pipenv install --verbose

```

Collecting CaaS>=1.0 (from invocations)
  1 location(s) to search for versions of CaaS:
  * https://pypi.python.org/simple/caas/
  Getting page https://pypi.python.org/simple/caas/
  Looking up "https://pypi.python.org/simple/caas/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/caas/ HTTP/1.1" 404 33
  Status code 404 not in [200, 203, 300, 301]
  Could not fetch URL https://pypi.python.org/simple/caas/: 404 Client Error: Not Found (caas does not exist) for url: https://pypi.python.org/simple/caas/ - skipping
Cleaning up...

```

Tries to get CaaS from pypi instead of private github repo's inside dependency_links of invocation's setup.py

Is this expected? How can I install CaaS package?

Thanks!

Upvotes: 1

Views: 1518

Answers (2)

pmlk
pmlk

Reputation: 680

In setup.py add git+ in the dependency_links (and the branch name @master)

setup(
    ...
    dependency_links=[
       "git+https://<repo>.git@master#egg=CaaS-1.0",
    ],
    ...
)

Using pipenv:

$ cd <dir_with_above_setup_py>
# enable pip flag --process-dependency-links
$ export PIP_PROCESS_DEPENDENCY_LINKS=1
$ pipenv install [-e] .

I was figuring this out myself the last few days. Checkout my GitHub repos PipenvApp and PipenvDependency. Keep in mind this was tested with Python 3.

Side note: the --process-dependency-links flag is/was deprecated, see pip issue #3939 and pip issue #4187

Upvotes: 1

phd
phd

Reputation: 94827

There is no such package at PyPI: https://pypi.python.org/pypi/CaaS

Error 404 Not Found.

Upvotes: 0

Related Questions