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

pipenv fails to install package that can be installed manually in the virtual env #4620

Closed
xirkus opened this issue Feb 14, 2021 · 2 comments

Comments

@xirkus
Copy link

xirkus commented Feb 14, 2021

Issue description

I'm trying to use pipenv install with a package that has an older tensorflow dependency which fails with the following error. At first, I thought this problem was with the lib that I want to use, but the issue happens even if I try to install the dependency directly for example: pipenv install tensorflow==1.15.5:

 % pipenv install tensorflow==1.15.5
Installing tensorflow==1.15.5...
Error:  An error occurred while installing tensorflow==1.15.0!
Error text: 
ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.5 (from -r /var/folders/sc/ycc3tm5d1js7bhb5kfvgwd0m0000gn/T/pipenv-ob9rvotp-requirements/pipenv-xb874qkn-requirement.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for tensorflow==1.15.5 (from -r /var/folders/sc/ycc3tm5d1js7bhb5kfvgwd0m0000gn/T/pipenv-ob9rvotp-requirements/pipenv-xb874qkn-requirement.txt (line 1))

Expected result

pipenv install should be have similarly to pip install when run inside the virtual env.

Actual result

See error above.

Steps to replicate

  1. pipenv --python 3.7 in a test directory.
  2. pipenv shell to enter your virtual environment.
  3. pip install --upgrade pip to upgrade to the latest version of pip in the virtual environment. Exit the virtual env.
  4. Run: pipenv install tensorflow==1.15.5. You should get a failure.
  5. pipenv shell to enter your virtual environment.
  6. pip install tensorflow==1.15.5 within the virtual environment. This will work.

$ pipenv --support

Pipenv version: '2020.11.15'

Pipenv location: '/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv'

Python location: '/usr/local/Cellar/pipenv/2020.11.15/libexec/bin/python'

Python installations found:

  • 3.9.1: /usr/local/bin/python3
  • 3.9.1: /usr/local/bin/python3.9
  • 3.8.2: /usr/bin/python3
  • 3.7.9: /Users/mel/.pyenv/versions/3.7.9/bin/python3
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.9.1',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '20.3.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST '
                     '2021; root:xnu-7195.81.3~1/RELEASE_X86_64',
 'python_full_version': '3.9.1',
 'python_version': '3.9',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • TERM_PROGRAM
  • PYENV_ROOT
  • SHELL
  • TERM
  • TMPDIR
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • USER
  • SSH_AUTH_SOCK
  • _
  • LaunchInstanceID
  • __CFBundleIdentifier
  • PWD
  • LANG
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • SHLVL
  • HOME
  • LOGNAME
  • SECURITYSESSIONID
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/Cellar/pipenv/2020.11.15/libexec/tools:/usr/local/opt/ruby/bin:/Users/mel/.pyenv/bin:/Users/mel/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/Apple/usr/bin
  • SHELL: /bin/zsh
  • LANG: en_CA.UTF-8
  • PWD: /Users/mel/Repositories/test

Contents of Pipfile ('/Users/mel/Repositories/test/Pipfile'):

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

[packages]
tensorflow = "==1.15.5"

[dev-packages]

[requires]
python_version = "3.7"
@franzhaas
Copy link

Hi,

I have a similar issue with jupyter. I have a solution which i am actually happy with so far in #4777 . Maybe you want to have a look.

Best regards
Franz

@matteius
Copy link
Member

matteius commented Mar 13, 2022

@xirkus Please see this comment which was for essentially the same issue: #4789 (comment)

Also this one: #4720 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants