Pipenv: `pipenv install` command cannot set current version of package into Pipfile

Created on 29 Sep 2018  ·  6Comments  ·  Source: pypa/pipenv

For example:
I ran pipenv install django a year ago, then django 1.19 installed, and django = "*" was added to Pipfile.
Now I run pipenv install in a new empty environment, I want to install django that the version of a year ago, but django 2.x is be installed.

I think pipenv should be similar with npm: when I run npm install xxx, then "xxx": "^1.2.3" will be added to dependencies of package.json

PS: I know the Pipefile.lock will lock the versions of every packages. But I still think that the way like npm is better.

$ pipenv --support

Pipenv version: '2018.7.1'

Pipenv location: '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv'

Python location: '/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6'

Other Python installations in PATH:

  • 2.7: /usr/bin/python2.7
  • 2.7: /usr/bin/python2.7
  • 3.5: /usr/local/bin/python3.5m
  • 3.5: /usr/local/bin/python3.5
  • 3.5: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5
  • 3.6: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6m
  • 3.6: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
  • 3.6: /usr/local/bin/python3.6

  • 2.7.10: /usr/bin/python

  • 3.6.3: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
  • 3.6.3: /usr/local/bin/python3
  • 3.5.1: /Library/Frameworks/Python.framework/Versions/3.5/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.6.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.6.0: Tue May  8 15:22:16 PDT '
                     '2018; root:xnu-4570.61.1~1/RELEASE_X86_64',
 'python_full_version': '3.6.3',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

  • MANPATH
  • TERM_PROGRAM
  • NVM_CD_FLAGS
  • ANDROID_HOME
  • SHELL
  • TERM
  • TMPDIR
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • NVM_DIR
  • USER
  • SSH_AUTH_SOCK
  • PATH
  • NVM_NODEJS_ORG_MIRROR
  • PWD
  • JAVA_HOME
  • LANG
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • SHLVL
  • HOME
  • LOGNAME
  • NVM_BIN
  • NVM_IOJS_ORG_MIRROR
  • _
  • OLDPWD
  • __CF_USER_TEXT_ENCODING
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/taojy123/.nvm/versions/node/v8.9.4/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/taojy123/Library/Android/sdk/tools:/Users/taojy123/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/3.5/bin
  • SHELL: /bin/bash
  • LANG: zh_CN.UTF-8
  • PWD: /Users/taojy123/test/tt3

Type

Most helpful comment

I don't think the response solves the issue. It seems like the poster wants pipenv to automatically specify the current version of the package when running pipenv install instead of having an asterisk. Similar to how npm install specifies the current version of the package in package.json.

All 6 comments

I don't think the response solves the issue. It seems like the poster wants pipenv to automatically specify the current version of the package when running pipenv install instead of having an asterisk. Similar to how npm install specifies the current version of the package in package.json.

vedantroy, thanks for you agree me!

:+1: for automatically pinning version when you run pipenv install without having asterisk.
@techalchemy What do you think about adding this feature?

+1 for adding this feature.

@trey
I tried to add this feature once, but it was rejected.
see https://github.com/pypa/pipenv/pull/2899
😓

Was this page helpful?
0 / 5 - 0 ratings