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.

pipenv check fails

See original GitHub issue

On latest version (2018.11.26) pipenv check command fail with result:

Checking PEP 508 requirements…
Passed!
Checking installed package safety…
An error occurred:
Unable to load vulnerability database

$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/home/mohammad/.local/lib/python3.7/site-packages/pipenv'

Python location: '/usr/bin/python3'

Python installations found:

  • 3.7.2: /usr/bin/python3.7m
  • 3.7.2: /usr/bin/python3
  • 2.7.16: /usr/bin/python2

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.7.2',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.1.7-1-default',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Tue Jun 4 07:56:54 UTC 2019 (55f2451)',
 'python_full_version': '3.7.2',
 'python_version': '3.7',
 'sys_platform': 'linux'}

System environment variables:

  • AUDIODRIVER
  • COLORFGBG
  • COLORTERM
  • CONFIG_SITE
  • CPU
  • CSHEDIT
  • CVS_RSH
  • DBUS_SESSION_BUS_ADDRESS
  • DESKTOP_SESSION
  • DISPLAY
  • FROM_HEADER
  • GS_LIB
  • GTK2_MODULES
  • GTK2_RC_FILES
  • GTK3_MODULES
  • GTK_IM_MODULE
  • GTK_MODULES
  • GTK_RC_FILES
  • G_BROKEN_FILENAMES
  • G_FILENAME_ENCODING
  • HISTSIZE
  • HOME
  • HOST
  • HOSTNAME
  • HOSTTYPE
  • JAVA_BINDIR
  • JAVA_HOME
  • JAVA_ROOT
  • JDK_HOME
  • JRE_HOME
  • KDE_FULL_SESSION
  • KDE_SESSION_UID
  • KDE_SESSION_VERSION
  • KONSOLE_DBUS_SERVICE
  • KONSOLE_DBUS_SESSION
  • KONSOLE_PROFILE_NAME
  • KONSOLE_VERSION
  • LANG
  • LANGUAGE
  • LESS
  • LESSCLOSE
  • LESSKEY
  • LESSOPEN
  • LESS_ADVANCED_PREPROCESSOR
  • LOGNAME
  • MACHTYPE
  • MAIL
  • MANPATH
  • MINICOM
  • MORE
  • OLDPWD
  • OSTYPE
  • PAGER
  • PATH
  • PROFILEHOME
  • PROFILEREAD
  • PWD
  • PYTHONSTARTUP
  • QEMU_AUDIO_DRV
  • QT_AUTO_SCREEN_SCALE_FACTOR
  • QT_IM_MODULE
  • QT_IM_SWITCHER
  • QT_SYSTEM_DIR
  • SDK_HOME
  • SDL_AUDIODRIVER
  • SESSION_MANAGER
  • SHELL
  • SHELL_SESSION_ID
  • SHLVL
  • SSH_AGENT_PID
  • SSH_ASKPASS
  • SSH_AUTH_SOCK
  • TERM
  • UBUNTU_MENUPROXY
  • USER
  • WINDOWID
  • WINDOWMANAGER
  • XAUTHLOCALHOSTNAME
  • XAUTHORITY
  • XCURSOR_THEME
  • XDG_CONFIG_DIRS
  • XDG_CURRENT_DESKTOP
  • XDG_DATA_DIRS
  • XDG_RUNTIME_DIR
  • XDG_SEAT
  • XDG_SEAT_PATH
  • XDG_SESSION_CLASS
  • XDG_SESSION_DESKTOP
  • XDG_SESSION_ID
  • XDG_SESSION_PATH
  • XDG_SESSION_TYPE
  • XDG_VTNR
  • XKEYSYMDB
  • XMODIFIERS
  • XNLSPATH
  • XSESSION_IS_UP
  • _
  • LS_COLORS
  • LS_OPTIONS
  • GPG_TTY
  • ZSH
  • LC_CTYPE
  • LSCOLORS
  • GVM_ROOT
  • GVM_VERSION
  • GVM_PATH_BACKUP
  • GOPATH
  • GOBIN
  • 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: /home/mohammad/.local/bin:/home/mohammad/.gvm/bin:/home/mohammad/bin:/usr/local/bin:/usr/bin:/bin:/home/mohammad/go/bin
  • SHELL: /usr/bin/zsh
  • LANG: en_US.UTF-8
  • PWD: /home/mohammad/Documents/apm

Contents of Pipfile (‘/home/mohammad/Documents/apm/Pipfile’):

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

[dev-packages]

[packages]

[requires]
python_version = "3.7"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
tatianacommented, Jul 19, 2019

@kierun @isabelrios @Majsvaffla The pyup.io website is still experiencing some issues, eg:

$ curl -i --head  https://pyup.io/pricing/
HTTP/1.1 500 Internal Server Error
Server: nginx/1.13.7
Date: Fri, 19 Jul 2019 09:41:35 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 3419
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
Vary: Cookie
X-Sentry-ID: b56a9cf0bfc94ed9bb44a6a265c7d32d
x-content-type-options: nosniff
x-xss-protection: 1; mode=block

The issue could also be with the way pipenv currently patches safety. Did you try to set your own PIPENV_PYUP_API_KEY?

Since the part of pipenv check which fails relates to safety, an alternative is to run directly:

 pipenv run safety check --full-report

Which does not perform a call to pyup.io. This works for me.

More information on the docs:

In order to enable this functionality while maintaining its permissive copyright license, pipenv embeds an API client key for the backend Safety API operated by pyup.io rather than including a full copy of the CC-BY-NC-SA licensed Safety-DB database. This embedded client key is shared across all pipenv check users, and hence will be subject to API access throttling based on overall usage rather than individual client usage.

You can also use your own safety API key by setting the environment variable PIPENV_PYUP_API_KEY.

https://github.com/pypa/pipenv/blob/e6cabe649a50edc0cc883f5e9659f8931108835f/docs/advanced.rst

1reaction
tatianacommented, Jul 19, 2019

@kierun meanwhile, pipenv run safety check --full-report is a good alternative. I just reported the issue to the pyup.io team, in case they are not aware. They have a great service, I hope it comes back soon 🍀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Pipenv Errors and How to Solve Them
Pipfile Management: Specifying Versions. The second most common reason locking fails is that we attempt to install a package that is a pre-release...
Read more >
pipenv check fails on pip · Issue #4600
The pip package before 19.2 for Python allows Directory Traversal when a URL is given in an install command, because a Content-Disposition ...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
Run pipenv lock --clear and try again. The lock sequence caches results to speed up subsequent runs.
Read more >
Pipenv throws and error when installing in docker
The bug has been fixed with today's release, so you can now go back to your original version. You may need to clear...
Read more >
pipenv Documentation
Generates and checks file hashes for locked dependencies when installing from Pipfile.lock. • Automatically install required Python version when pyenv is ...
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