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 install` command cannot set current version of package into Pipfile

See original GitHub issue

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

Issue Analytics

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

github_iconTop GitHub Comments

13reactions
vedantroycommented, Mar 4, 2019

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.

1reaction
treycommented, May 26, 2020

+1 for adding this feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Usage of Pipenv - Read the Docs
$ pipenv install is used for installing packages into the pipenv virtual environment and updating your Pipfile. Along with the basic install command,...
Read more >
How to fix "ERROR: Could not find a version that matches ...
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again. Alternatively, you can use $ pipenv...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Pipfile Management: Specifying Versions ... The second most common reason locking fails is that we attempt to install a package that is a...
Read more >
pipenv Documentation - Read the Docs
Pipenv uses a set of commands to manage your Project's dependencies and ... Will add the package in version 0.2 to the virtual...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
That functionality was deprecated in favor of index restricted packages, ... pipenv install --ignore-pipfile is nearly equivalent to pipenv sync ...
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