question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support for multiple sources

See original GitHub issue

I have tried to define two sources in Pipfile, something like this:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[[source]]
url = "https://myprivatepypi.com/simple"
verify_ssl = true
name = "internal"

[requires]
python_version = "2.7"

[dev-packages]
"coverage" = {version="*", index="pypi"}

[packages]
"my-private-package" = {version="*", index="internal"}

However, when I try pipenv install I run into an error, which includes a 404, saying that pipenv is looking for ‘my-private-package’ in https://pypi.python.org/simple.

https://github.com/kennethreitz/pipenv/blob/1faec7f251780e318264dee0699e6936e0c2000b/pipenv/project.py#L412-L413

Seems like the code might just be grabbing the first source in the Pipfile?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:24 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Mar 13, 2018

@kennethreitz I have some code on this as of yesterday which started to handle the cross-index resolution problem. It worked actually but it wrote the wrong info to the lockfile. I did note that we currently write no info to the lockfile

1reaction
heldercocommented, Sep 29, 2017

Tried this and still hangs:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[[source]]
url = "https://pypi.example.org/simple"
verify_ssl = true
name = "internal"

[packages]
django =  {version="~=1.11.5", index="pypi"}
mysqlclient =  {version="*", index="pypi"}
django-environ = {version="*", index="pypi"}
django-mfcookie = {version="*", index="internal"}

Here’s the output:

$ pipenv --three install --verbose
Virtualenv already exists!
Removing existing virtualenv…
Creating a virtualenv for this project…
Using /usr/local/bin/python3 to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/python3.6
Also creating executable in /Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: /Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A
Installing dependencies from Pipfile.lock…
Installing 'pytz==2017.2 --hash=sha256:c883c2d6670042c7bc1688645cac73dd2b03193d1f7a6847b6154e96890be06d  --hash=sha256:03c9962afe00e503e2d96abab4e8998a0f84d4230fa57afe1e0528473698cdd9  --hash=sha256:487e7d50710661116325747a9cd1744d3323f8e49748e287bc9e659060ec6bf9  --hash=sha256:43f52d4c6a0be301d53ebd867de05e2926c35728b3260157d274635a0a947f1c  --hash=sha256:d1d6729c85acea5423671382868627129432fba9a89ecbb248d8d1c7a9f01c67  --hash=sha256:54a935085f7bf101f86b2aff75bd9672b435f51c3339db2ff616e66845f2b8f9  --hash=sha256:39504670abb5dae77f56f8eb63823937ce727d7cdd0088e6909e6dcac0f89043  --hash=sha256:ddc93b6d41cfb81266a27d23a79e13805d4a5521032b512643af8729041a81b4  --hash=sha256:f5c056e8f62d45ba8215e5cb8f50dfccb198b4b9fbea8500674f3443e4689589'
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-nD8Lmf-requirement.txt --require-hashes -i https://pypi.python.org/simple --exists-action w
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-nD8Lmf-requirement.txt --require-hashes -i https://pypi.example.org/simple --exists-action w
Installing 'django-environ==0.4.4 --hash=sha256:e9c171b9d5f540e6f3bc42866941d9cd0bd77fb110a7c13a7c4857a2c08cfa40  --hash=sha256:ee2f8405d83137e3328b26b3de01bd715b5395fca22feb919dcc905fb6099cfa'
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-aWT2Lj-requirement.txt --require-hashes -i https://pypi.python.org/simple --exists-action w
Installing 'six==1.11.0 --hash=sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb  --hash=sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9'
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-E_7UsF-requirement.txt --require-hashes -i https://pypi.python.org/simple --exists-action w
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-E_7UsF-requirement.txt --require-hashes -i https://pypi.example.org/simple --exists-action w
Installing 'mysqlclient==1.3.12 --hash=sha256:b3b1a7e4468180afb79289b54069d9499242946a4cedf3928cbf6b2a13800016  --hash=sha256:d56e379c03efad746e84705cbb97401f60d1f98b05e11a27f2d9c2d043936974  --hash=sha256:371df79d000af56b4e540b7ce2120d1c9afb04b751bfce25a1eb609c50fd10ff  --hash=sha256:1e85e48b167e2af3bb08f273fdbd1ad6401cbe75057fa6513f97387dc7b282dc  --hash=sha256:2d9ec33de39f4d9c64ad7322ede0521d85829ce36a76f9dd3d6ab76a9c8648e5'
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-GU9uWO-requirement.txt --require-hashes -i https://pypi.python.org/simple --exists-action w
Installing 'django-mfcookie==0.3.3'▉▉▉ 4/6 — 00:00:00
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-zn2odJ-requirement.txt -i https://pypi.example.org/simple --exists-action w
Installing 'django==1.11.5 --hash=sha256:89162f70a74aac62a53f975128faba6099a7ef2c9d8140a41ae9d6210bda05cd  --hash=sha256:1836878162dfdf865492bacfdff0321e4ee8f1e7d51d93192546000b54982b29'
$ "/Users/helder/.local/share/virtualenvs/pip-XBl5Wj6A/bin/pip" install   --verbose --no-deps  -r /var/folders/2v/nmb819xx3wsb7hcqvd68230w0000gn/T/pipenv-szL0JQ-requirement.txt --require-hashes -i https://pypi.python.org/simple --exists-action w
Read more comments on GitHub >

github_iconTop Results From Across the Web

5 ways to manage multiple data sources for high-performance ...
1. Know what data to combine ... The first thing to understand is what you should combine, both in terms of the data...
Read more >
Support for multiple Source Systems | Voters - HelloID - Canny
Provide the ability to support multiple source systems. It's not uncommon for an organization to have multiple sources for their data.
Read more >
How to Get Data from Multiple Sources - Integrate.io
How to Integrate Data from Multiple Sources · Step 1: Decide Which Sources to Use · Step 2: Choose a Data Integration Method...
Read more >
Add support for multiple sources driving a single style layer
New concept: you can have multiple sources for a single visual layer. The sources should have compatible feature types for the style layer...
Read more >
Learn to combine multiple data sources (Power Query)
Power Query is known as Get & Transform in Excel 2016. Use Power Query's Query Editor to import data from a local Excel...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found