Issue description
Sometimes I use pipenv with environment variable PIP_TARGET for install libraries to specified directory.
But pipenv will skip install libraries if libraries already install to default location.
Expected result
pipenv should install libraries to specified directory when exec with environment variable PIP_TARGET.
Actual result
pipenv will skip install libraries to specified directory when libraries already installed to default location(.venv/lib/pythonx.x/site-packages).
Steps to replicate
- install some library and create Pipfile.lock
- Create some directory for specify pip install target.
- Try install library to specified directory.
PIP_TARGET=layer pipenv sync
Installing dependencies from Pipfile.lock (34ad89)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 0
Install library will skip and output 0/0 — 00:00:00
- List specified directory.There are no library.
This command will return empty result.
$ pipenv --support
Pipenv version: '2020.6.2'
Pipenv location: '/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/lib/python3.8/site-packages/pipenv'
Python location: '/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3.8'
Python installations found:
3.9.2: /usr/local/bin/python3
3.9.2: /usr/local/bin/python3.9
3.8.3: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3
3.8.3: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3.8
3.8.3: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3
3.7.8: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.7.8/bin/python3
3.7.3: /usr/bin/python3
3.6.5: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.6.5/bin/python3
3.6.1: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.6.1/bin/python3
2.7.16: /usr/bin/python2
2.7.16: /usr/bin/python2.7
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.8.3',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '19.5.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT '
'2020; root:xnu-6153.121.2~2/RELEASE_X86_64',
'python_full_version': '3.8.3',
'python_version': '3.8',
'sys_platform': 'darwin'}
System environment variables:
LDFLAGS
TERM_PROGRAM
NODENV_SHELL
PYENV_ROOT
SHELL
TERM
TMPDIR
CPPFLAGS
PIPENV_VENV_IN_PROJECT
TERM_PROGRAM_VERSION
GOENV_ROOT
TERM_SESSION_ID
PYENV_VERSION
NODENV_ROOT
LC_ALL
USER
RBENV_ROOT
SSH_AUTH_SOCK
PYENV_DIR
__CF_USER_TEXT_ENCODING
PATH
LaunchInstanceID
PWD
LANG
ITERM_PROFILE
CLOUDSDK_PYTHON
PYENV_HOOK_PATH
XPC_FLAGS
RBENV_SHELL
XPC_SERVICE_NAME
HISTCONTROL
COLORFGBG
HOME
SHLVL
PYENV_SHELL
LC_TERMINAL_VERSION
ITERM_SESSION_ID
LOGNAME
GOENV_SHELL
LC_TERMINAL
SECURITYSESSIONID
COLORTERM
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
PIPENV_VENV_IN_PROJECT: 1
Debug–specific environment variables:
PATH: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin:/Users/cm-iwata/.anyenv/envs/pyenv/libexec:/Users/cm-iwata/.anyenv/envs/pyenv/plugins/python-build/bin:/Users/cm-iwata/gcp/google-cloud-sdk/bin:/usr/local/bin:/usr/local/opt/mysql-client/bin:/Users/cm-iwata/.anyenv/envs/rbenv/shims:/Users/cm-iwata/.anyenv/envs/rbenv/bin:/Users/cm-iwata/.anyenv/envs/pyenv/shims:/Users/cm-iwata/.anyenv/envs/pyenv/bin:/Users/cm-iwata/.anyenv/envs/nodenv/shims:/Users/cm-iwata/.anyenv/envs/nodenv/bin:/Users/cm-iwata/.anyenv/envs/goenv/shims:/Users/cm-iwata/.anyenv/envs/goenv/bin:/Users/cm-iwata/.anyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
SHELL: /bin/bash
LANG: en_US.UTF-8
PWD: /tmp/pipenvtest2
Contents of Pipfile ('/private/tmp/pipenvtest2/Pipfile'):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
six = "*"
[requires]
python_version = "3.8"
Contents of Pipfile.lock ('/private/tmp/pipenvtest2/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "d9b5cc506fc4feb9bf1ae7cadfd3737d5a0bd2b2d6c3fbcf0de3458bab34ad89"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.8"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"six": {
"hashes": [
"sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
"sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
],
"index": "pypi",
"version": "==1.16.0"
}
},
"develop": {}
}
Issue description
Sometimes I use pipenv with environment variable
PIP_TARGETfor install libraries to specified directory.But pipenv will skip install libraries if libraries already install to default location.
Expected result
pipenv should install libraries to specified directory when exec with environment variable
PIP_TARGET.Actual result
pipenv will skip install libraries to specified directory when libraries already installed to default location(
.venv/lib/pythonx.x/site-packages).Steps to replicate
Install library will skip and output
0/0 — 00:00:00This command will return empty result.
$ pipenv --support
Pipenv version:
'2020.6.2'Pipenv location:
'/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/lib/python3.8/site-packages/pipenv'Python location:
'/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3.8'Python installations found:
3.9.2:/usr/local/bin/python33.9.2:/usr/local/bin/python3.93.8.3:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python33.8.3:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3.83.8.3:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python33.7.8:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.7.8/bin/python33.7.3:/usr/bin/python33.6.5:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.6.5/bin/python33.6.1:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.6.1/bin/python32.7.16:/usr/bin/python22.7.16:/usr/bin/python2.7PEP 508 Information:
System environment variables:
LDFLAGSTERM_PROGRAMNODENV_SHELLPYENV_ROOTSHELLTERMTMPDIRCPPFLAGSPIPENV_VENV_IN_PROJECTTERM_PROGRAM_VERSIONGOENV_ROOTTERM_SESSION_IDPYENV_VERSIONNODENV_ROOTLC_ALLUSERRBENV_ROOTSSH_AUTH_SOCKPYENV_DIR__CF_USER_TEXT_ENCODINGPATHLaunchInstanceIDPWDLANGITERM_PROFILECLOUDSDK_PYTHONPYENV_HOOK_PATHXPC_FLAGSRBENV_SHELLXPC_SERVICE_NAMEHISTCONTROLCOLORFGBGHOMESHLVLPYENV_SHELLLC_TERMINAL_VERSIONITERM_SESSION_IDLOGNAMEGOENV_SHELLLC_TERMINALSECURITYSESSIONIDCOLORTERMPIP_DISABLE_PIP_VERSION_CHECKPYTHONDONTWRITEBYTECODEPIP_SHIMS_BASE_MODULEPIP_PYTHON_PATHPYTHONFINDER_IGNORE_UNSUPPORTEDPipenv–specific environment variables:
PIPENV_VENV_IN_PROJECT:1Debug–specific environment variables:
PATH:/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin:/Users/cm-iwata/.anyenv/envs/pyenv/libexec:/Users/cm-iwata/.anyenv/envs/pyenv/plugins/python-build/bin:/Users/cm-iwata/gcp/google-cloud-sdk/bin:/usr/local/bin:/usr/local/opt/mysql-client/bin:/Users/cm-iwata/.anyenv/envs/rbenv/shims:/Users/cm-iwata/.anyenv/envs/rbenv/bin:/Users/cm-iwata/.anyenv/envs/pyenv/shims:/Users/cm-iwata/.anyenv/envs/pyenv/bin:/Users/cm-iwata/.anyenv/envs/nodenv/shims:/Users/cm-iwata/.anyenv/envs/nodenv/bin:/Users/cm-iwata/.anyenv/envs/goenv/shims:/Users/cm-iwata/.anyenv/envs/goenv/bin:/Users/cm-iwata/.anyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Applications/Visual Studio Code.app/Contents/Resources/app/binSHELL:/bin/bashLANG:en_US.UTF-8PWD:/tmp/pipenvtest2Contents of
Pipfile('/private/tmp/pipenvtest2/Pipfile'):Contents of
Pipfile.lock('/private/tmp/pipenvtest2/Pipfile.lock'):{ "_meta": { "hash": { "sha256": "d9b5cc506fc4feb9bf1ae7cadfd3737d5a0bd2b2d6c3fbcf0de3458bab34ad89" }, "pipfile-spec": 6, "requires": { "python_version": "3.8" }, "sources": [ { "name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true } ] }, "default": { "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], "index": "pypi", "version": "==1.16.0" } }, "develop": {} }