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.

Brand new Pipenv environment can't install tensorflow?

See original GitHub issue

pip can install it perfectly fine.

~/Documents/GitHub.nosync/MLScoringWebsite anthony_feature_db-migration !2 ?2
❯ pipenv install --python 3.8
Creating a virtualenv for this project...
Pipfile: /Users/anthony/Documents/GitHub.nosync/MLScoringWebsite/Pipfile
Using /Users/anthony/.pyenv/versions/3.8.10/bin/python3.8 (3.8.10) to create virtualenv...
⠦ Creating virtual environment...created virtual environment CPython3.8.10.final.0-64 in 392ms
  creator CPython3Posix(dest=/Users/anthony/.local/share/virtualenvs/MLScoringWebsite-XKb5Cqz5, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/anthony/Library/Application Support/virtualenv)
    added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

✔ Successfully created virtual environment!
Virtualenv location: /Users/anthony/.local/share/virtualenvs/MLScoringWebsite-XKb5Cqz5
Creating a Pipfile for this project...
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (db4242)!
Installing dependencies from Pipfile.lock (db4242)...
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
~/Documents/GitHub.nosync/MLScoringWebsite anthony_feature_db-migration !2 ?2
❯ pipenv install tensorflow
Installing tensorflow...
Adding tensorflow to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock (db4242) out of date, updating to (66d06e)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
[ResolutionFailure]:   File "/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv/resolver.py", line 741, in _main
[ResolutionFailure]:       resolve_packages(pre, clear, verbose, system, write, requirements_dir, packages, dev)
[ResolutionFailure]:   File "/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv/resolver.py", line 702, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:   File "/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv/resolver.py", line 684, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:   File "/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv/utils.py", line 1397, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:   File "/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv/utils.py", line 1110, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv/utils.py", line 835, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: Could not find a version that matches tensorflow (from -r /var/folders/28/2sy26r512hq5jdpx18q4ycjw0000gn/T/pipenveg_83kdsrequirements/pipenv-8e528zrc-constraints.txt (line 2))
No versions found
Was https://pypi.org/simple reachable?
$ pipenv --support

Pipenv version: '2021.5.29'

Pipenv location: '/Users/anthony/.local/pipx/venvs/pipenv/lib/python3.8/site-packages/pipenv'

Python location: '/Users/anthony/.local/pipx/venvs/pipenv/bin/python'

Python installations found:

  • 3.9.5: /Users/anthony/.pyenv/versions/3.9.5/bin/python3
  • 3.9.5: /usr/local/bin/python3
  • 3.9.5: /usr/local/bin/python3.9
  • 3.8.10: /Users/anthony/.pyenv/versions/3.8.10/bin/python3
  • 3.8.2: /usr/bin/python3
  • 3.7.10: /Users/anthony/.pyenv/versions/3.7.10/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.10',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '20.5.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT '
                     '2021; root:xnu-7195.121.3~9/RELEASE_X86_64',
 'python_full_version': '3.8.10',
 'python_version': '3.8',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_SESSION_ID
  • SSH_AUTH_SOCK
  • LC_TERMINAL_VERSION
  • COLORFGBG
  • ITERM_PROFILE
  • XPC_FLAGS
  • LANG
  • PWD
  • SHELL
  • __CFBundleIdentifier
  • SECURITYSESSIONID
  • TERM_PROGRAM_VERSION
  • TERM_PROGRAM
  • PATH
  • LC_TERMINAL
  • COLORTERM
  • COMMAND_MODE
  • TERM
  • HOME
  • TMPDIR
  • USER
  • XPC_SERVICE_NAME
  • LOGNAME
  • LaunchInstanceID
  • __CF_USER_TEXT_ENCODING
  • ITERM_SESSION_ID
  • SHLVL
  • OLDPWD
  • P9K_TTY
  • _P9K_TTY
  • P9K_SSH
  • ZSH
  • MANPAGER
  • PAGER
  • LESS
  • LSCOLORS
  • YSU_VERSION
  • _
  • 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: /Users/anthony/.pyenv/shims:/Users/anthony/.local/bin:/Users/anthony/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Library/Apple/usr/bin:/usr/local/opt/fzf/bin
  • SHELL: /bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /Users/anthony/Documents/GitHub.nosync/MLScoringWebsite

Contents of Pipfile (‘/Users/anthony/Documents/GitHub.nosync/MLScoringWebsite/Pipfile’):

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

[packages]
tensorflow = "==2.4"

[dev-packages]

[requires]
python_version = "3.8"

Contents of Pipfile.lock (‘/Users/anthony/Documents/GitHub.nosync/MLScoringWebsite/Pipfile.lock’):

{
    "_meta": {
        "hash": {
            "sha256": "7f7606f08e0544d8d012ef4d097dabdd6df6843a28793eb6551245d4b2db4242"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.8"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {},
    "develop": {}
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

2reactions
matteiuscommented, Jan 9, 2022

@Kurt-von-Laven closing this out, as this was described in the thread linked through above that the issue had to do with tensorflow packages for that version were very specific arch/OS wheels and that nothing was resolved for your system: https://github.com/pypa/pipenv/issues/2619#issuecomment-410137778

Worth noting too that latest versions of pip have the same difficulty:

(pipenv-4720) mdavis@matt-VirtualBox:~/shared-projects/pipenv-4720$ pip install tensorflow==2.4
ERROR: Could not find a version that satisfies the requirement tensorflow==2.4 (from versions: 2.5.0rc0, 2.5.0rc1, 2.5.0rc2, 2.5.0rc3, 2.5.0, 2.5.1, 2.5.2, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.8.0rc0)

ERROR: No matching distribution found for tensorflow==2.4

(pipenv-4720) mdavis@matt-VirtualBox:~/shared-projects/pipenv-4720$ pip --version
pip 21.3.1
2reactions
Kurt-von-Lavencommented, Jan 18, 2022

Thanks for the tip. Seems like we should keep this bug open for a Pipenv maintainer to look at it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing TensorFlow with pipenv gives error - Stack Overflow
1 Answer 1 · Remove the virtual environment with pipenv --rm · Remove the Pipfile.lock · Change the last lines of your Pipfile...
Read more >
Install TensorFlow with pip
TensorFlow requires a recent version of pip, so upgrade your pip installation to be sure you're running the latest version. Then, install TensorFlow...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Be aware that the 'Installation Succeeded' alert is untrue; there is no Panadas to install. All that s occurred is the addition of...
Read more >
Using pyenv with pipenv - Murawski Blog
THey can't be installed in parallel in the global scope - they will overwrite each other. Also the related dependencies of each tensorflow...
Read more >
I can't install TensorFlow-macos a… | Apple Developer Forums
However, all installing instruction commands not work at all. After that, I looked into pypi.org and found out there are whl files for...
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