Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SourceNotFound for internal source on 11.10.0 #1994

Closed
Yoshi325 opened this issue Apr 13, 2018 · 3 comments
Closed

SourceNotFound for internal source on 11.10.0 #1994

Yoshi325 opened this issue Apr 13, 2018 · 3 comments
Labels
Type: Possible Bug This issue describes a possible bug in pipenv.
Milestone

Comments

@Yoshi325
Copy link

Be sure to check the existing issues (both open and closed!). ✔︎

Internal source in Pipfile on Python 3.6.5 on Windows 10 with PipEnv v11.10.0 fails with pipenv.project.SourceNotFound.

$ python -m pipenv.help output

Pipenv version: '11.10.0'

Pipenv location: 'C:\\Program Files\\Python36\\lib\\site-packages\\pipenv'

Python location: 'C:\\Program Files\\Python36\\python.exe'

Other Python installations in PATH:

  • 3.6: C:\Program Files\Python36\python.exe

  • 3.6.5: C:\Program Files\Python36\python.exe

  • 3.6.5: C:\Windows\py.exe

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.5',
 'os_name': 'nt',
 'platform_machine': 'AMD64',
 'platform_python_implementation': 'CPython',
 'platform_release': '10',
 'platform_system': 'Windows',
 'platform_version': '10.0.16299',
 'python_full_version': '3.6.5',
 'python_version': '3.6',
 'sys_platform': 'win32'}

System environment variables:

  • ALLUSERSPROFILE
  • ANSICON
  • ANSICON_DEF
  • APPDATA
  • CL
  • CMDER_ROOT
  • COMMONPROGRAMFILES
  • COMMONPROGRAMFILES(X86)
  • COMMONPROGRAMW6432
  • COMPUTERNAME
  • COMSPEC
  • CONEMUANSI
  • CONEMUANSILOG
  • CONEMUBACKHWND
  • CONEMUBASEDIR
  • CONEMUBUILD
  • CONEMUDIR
  • CONEMUDRAWHWND
  • CONEMUDRIVE
  • CONEMUHOOKS
  • CONEMUHWND
  • CONEMUISADMIN
  • CONEMUPALETTE
  • CONEMUPID
  • CONEMUSERVERPID
  • CONEMUTASK
  • CONEMUWORKDIR
  • CONEMUWORKDRIVE
  • GITLAB_PRIVATE_TOKEN
  • GIT_SSH
  • HOME
  • HOMEDRIVE
  • HOMEPATH
  • LOCALAPPDATA
  • LOGONSERVER
  • NUMBER_OF_PROCESSORS
  • ONEDRIVE
  • OS
  • PATH
  • PATHEXT
  • PROCESSOR_ARCHITECTURE
  • PROCESSOR_IDENTIFIER
  • PROCESSOR_LEVEL
  • PROCESSOR_REVISION
  • PROGRAMDATA
  • PROGRAMFILES
  • PROGRAMFILES(X86)
  • PROGRAMW6432
  • PSEXECUTIONPOLICYPREFERENCE
  • PSMODULEPATH
  • PUBLIC
  • SIGNING_PRIVATE_TOKEN
  • SYSTEMDRIVE
  • SYSTEMROOT
  • TEMP
  • TMP
  • UPDATE_SCRIPT_SIGNING_KEY
  • USERDOMAIN
  • USERDOMAIN_ROAMINGPROFILE
  • USERNAME
  • USERPROFILE
  • VCINSTALLDIR
  • VS100COMNTOOLS
  • VS110COMNTOOLS
  • VS120COMNTOOLS
  • VS140COMNTOOLS
  • WINDIR
  • WIX
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH
  • PYTHONUNBUFFERED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: C:\Users\<user_name>\scoop\apps\cmder\current\bin;C:\Users\<user_name>\scoop\apps\cmder\current\vendor\conemu-maximus5\ConEmu\Scripts;C:\Users\<user_name>\scoop\apps\cmder\current\vendor\conemu-maximus5;C:\Users\<user_name>\scoop\apps\cmder\current\vendor\conemu-maximus5\ConEmu;C:\Program Files\Python36\Scripts\;C:\Program Files\Python36\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\<user_name>\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Fibratus\bin;C:\Users\<user_name>\scoop\shims;C:\Users\<user_name>\AppData\Local\Microsoft\WindowsApps;C:\Users\<user_name>\AppData\Local\atom\bin;C:\Users\<user_name>\AppData\Local\Microsoft\WindowsApps;C:\Users\<user_name>\scoop\apps\cmder\current;C:\Program Files\Python36\lib\site-packages\pywin32_system32

Contents of Pipfile ('\\vmware-host\Shared Folders\Project-Folder\Pipfile'):

# syntax: TOML


[[source]]

url        = "https://pypi.python.org/simple"
verify_ssl = true
name       = "external"


[[source]]

url        = "http://pypi.private-domain.local"
verify_ssl = false
name       = "internal"


[packages]

some_package = {version = "*", index = "internal"}

Expected result

PipEnv resolves and installs package from internal source.

Actual result
Z:\Project-Directory [active ≡ +0 ~0 -2 | +7 ~52 -2 !]
λ  pipenv --site-packages sync --dev --verbose
Virtualenv already exists!
Removing existing virtualenv…
Creating a virtualenv for this project…
Using c:\program files\python36\python.exe (3.6.5) to create virtualenv…
Already using interpreter c:\program files\python36\python.exe
Using base prefix 'c:\\program files\\python36'
New python executable in C:\Users\<user_name>\.virtualenvs\Project-Directory--sibyjMA\Scripts\python.exe
Installing setuptools, pip, wheel...done.

Making site-packages available…
Virtualenv location: C:\Users\<user_name>\.virtualenvs\Project-Directory--sibyjMA
Locking [dev-packages] dependencies…
.py", line 65, in resolve
    allow_global=system,
  File "c:\program files\python36\lib\site-packages\pipenv\utils.py", line 442, in resolve_deps
    pre,
  File "c:\program files\python36\lib\site-packages\pipenv\utils.py", line 317, in actually_resolve_reps
    url=dep.split(' -i ')[1]
  File "c:\program files\python36\lib\site-packages\pipenv\project.py", line 634, in get_source
    raise SourceNotFound(name or url)
pipenv.project.SourceNotFound: 'http://pypi.private-domain.local --trusted-host pypi.private-domain.local'
Steps to replicate

Fresh install of Python 3.6.5 and PipEnv 11.10.0 with an additional source in it, then using pipenv --site-packages sync --dev.

I do not experience this problem in 11.1.0 and 11.9.0, so it appears to only be a bug with 11.10.0.

@techalchemy
Copy link
Member

@Yoshi325 this is not well documented (most likely) but pipenv sync is completely useless if you don't run pipenv lock first -- sync just brings your environment up to date with the lockfile but if you make changes in your pipfile you should lock first

techalchemy added a commit that referenced this issue Apr 14, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Apr 14, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy added this to the 11.10.1 milestone Apr 14, 2018
@techalchemy techalchemy added the Type: Possible Bug This issue describes a possible bug in pipenv. label Apr 14, 2018
techalchemy added a commit that referenced this issue Apr 14, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Apr 16, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Apr 16, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Apr 17, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue Apr 17, 2018
- Handle extra-index-urls when resolving
- Handle extra-index-url when using `--skip-lock`
- Parse index arguments when installing individual packages
- Translate index aliases to urls
- Always include extra indexes when installing a packages
- `get_source()` falls back to `parsed_pipfile['source']` for sources when
   not present in the lockfile (#1994)
- Include index and extra-index-url arguments in `pipenv lock -r` output
- Fixes #1973, #1974, #1852, #1977, #1994

Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy
Copy link
Member

closed by #1980

@Yoshi325
Copy link
Author

Thank you for the information about pipenv lock and the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Possible Bug This issue describes a possible bug in pipenv.
Projects
None yet
Development

No branches or pull requests

2 participants