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.

I can't install Django (or any other package) using pipenv

See original GitHub issue

I can’t install Django (or any other package) using pipenv. I “think” I have a conflict with the Python versions installed on my system (Ubuntu 18.04), or when installing pipenv with pip.

How could I solve this problem? Thanks in advance

pipenv installed by:

$ pip install --user pipenv

$ python --version
Python 2.7.15rc1 (by default, even though I use an alias to run python3 by default. alias python=‘/usr/bin/python3.6’ )

$ pipenv --python 3 Creating a virtualenv for this project… Pipfile: /home/ro/workspace/pyt/django-jwt/Pipfile Using /usr/bin/python3 (3.6.6) to create virtualenv… ⠋Running virtualenv with interpreter /usr/bin/python3 Using base prefix ‘/usr’ New python executable in /home/ro/.local/share/virtualenvs/django-jwt-l8_cwxbw/bin/python3 Also creating executable in /home/ro/.local/share/virtualenvs/django-jwt-l8_cwxbw/bin/python Installing setuptools, pip, wheel…done. Setting project for django-jwt-l8_cwxbw to /home/ro/workspace/pyt/django-jwt

Virtualenv location: /home/ro/.local/share/virtualenvs/django-jwt-l8_cwxbw Creating a Pipfile for this project…

$ pipenv install django Installing django… Traceback (most recent call last): File “/home/ro/.local/bin/pipenv”, line 11, in <module> sys.exit(cli()) File “/home/ro/.local/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 722, in call return self.main(*args, **kwargs) File “/home/ro/.local/lib/python2.7/site-packages/pipenv/vendor/click/core.py”, line 697, in main rv = self.invoke(ctx) … … File “/home/ro/.local/lib/python2.7/site-packages/pipenv/vendor/requirementslib/models/requirements.py”, line 704, in from_line line, extras = _strip_extras(line) TypeError: ‘module’ object is not callable /home/ro/.local/lib/python2.7/site-packages/pipenv/_compat.py:113: ResourceWarning: Implicitly cleaning up <TemporaryDirectory ‘/tmp/pipenv-Bpi57Z-requirements’> warnings.warn(warn_message, ResourceWarning)

$ pipenv --support pipenv --support Pipenv version: `'2018.7.1'`

Pipenv location: '/home/ro/.local/lib/python2.7/site-packages/pipenv'

Python location: '/usr/bin/python'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7

  • 2.7: /usr/bin/python2.7

  • 3.6: /usr/bin/python3.6m

  • 3.6: /usr/bin/python3.6

  • 2.7.15: /usr/bin/python

  • 2.7.15: /usr/bin/python2

  • 3.6.6: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '4.15.0-36-generic',
 'platform_system': 'Linux',
 'platform_version': '#39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018',
 'python_full_version': '2.7.15rc1',
 'python_version': '2.7',
 'sys_platform': 'linux2'}

System environment variables:

  • KDE_SESSION_VERSION
  • XCURSOR_SIZE
  • XDG_CURRENT_DESKTOP
  • XDG_SESSION_TYPE
  • LOGNAME
  • USER
  • PATH
  • XDG_VTNR
  • HOME
  • PAM_KWALLET_LOGIN
  • DISPLAY
  • KDE_FULL_SESSION
  • LANG
  • PROFILEHOME
  • TERM
  • SHELL
  • COLORFGBG
  • XAUTHORITY
  • LANGUAGE
  • SESSION_MANAGER
  • XDG_DATA_DIRS
  • GS_LIB
  • MANDATORY_PATH
  • KONSOLE_PROFILE_NAME
  • XCURSOR_THEME
  • KONSOLE_DBUS_WINDOW
  • RBENV_SHELL
  • QT_ACCESSIBILITY
  • WINDOWID
  • XDG_RUNTIME_DIR
  • SSH_AGENT_PID
  • __GIT_PROMPT_IGNORE_SUBMODULES
  • KONSOLE_DBUS_SESSION
  • XDG_SESSION_CLASS
  • XDG_SESSION_DESKTOP
  • KDE_SESSION_UID
  • __GIT_PROMPT_SHOW_CHANGED_FILES_COUNT
  • SSH_AUTH_SOCK
  • KONSOLE_DBUS_SERVICE
  • PAM_KWALLET5_LOGIN
  • PIP_PYTHON_PATH
  • GTK2_RC_FILES
  • XDG_SEAT_PATH
  • XDG_SESSION_PATH
  • GIT_BRANCH
  • LESSOPEN
  • XDG_SESSION_ID
  • SHELL_SESSION_ID
  • _
  • DBUS_SESSION_BUS_ADDRESS
  • GTK_RC_FILES
  • DESKTOP_SESSION
  • GPG_AGENT_INFO
  • LESSCLOSE
  • DEFAULTS_PATH
  • XDG_SEAT
  • OLDPWD
  • __GIT_PROMPT_IGNORE_STASH
  • PYTHONDONTWRITEBYTECODE
  • __GIT_PROMPT_SHOW_UNTRACKED_FILES
  • SHLVL
  • PWD
  • QT_AUTO_SCREEN_SCALE_FACTOR
  • COLORTERM
  • XDG_CONFIG_DIRS
  • LS_COLORS
  • __GIT_PROMPT_SHOW_UPSTREAM

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/heroku/bin:/home/ro/.rbenv/plugins/ruby-build/bin:/home/ro/.rbenv/shims:/home/ro/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ro/.local/bin
  • SHELL: /bin/bash
  • LANG: es_ES.UTF-8
  • PWD: /home/ro/workspace/pyt/django-jwt

Contents of Pipfile (‘/home/ro/workspace/pyt/django-jwt/Pipfile’):

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

[dev-packages]

[packages]

[requires]
python_version = "3.6"

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
techalchemycommented, Oct 9, 2018

new release is out also, good luck!

1reaction
ManniCScommented, Oct 9, 2018

I have the same problem. Downgrading to pip 18.0, as suggested on https://github.com/pypa/pipenv/pull/2935 did not solve for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't install Django using pipenv for unknown reason (but can ...
It sounds like you haven't activated the virtual environment - try pipenv shell then django-admin ...
Read more >
Pipenv: command not found - Django - Code with Mosh Forum
Run pip show pipenv . Check the location and add that to the top of your Path environment variable.
Read more >
How to Install Django Using pipenv (2/27) - YouTube
How to Install Django Using pipenv. This is video 2 of the Beginner Django tutorial for RICOH THETA images.
Read more >
Pipenv & Virtual Environments - Python Packaging Authority
This tutorial walks you through installing and using Python packages. It will show you how to install and use the necessary tools and...
Read more >
How to install Django
Get the latest version of Python at https://www.python.org/downloads/ or with your operating system's package manager. Python on Windows. If you are just ......
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