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` throws `--system is intended to be used for pre-existing Pipfile installation`

See original GitHub issue

Issue description

Running pipenv install in a new project throws an error, if there was a project created before with the same directory path.

Expected result

pipenv should be able to handle this situation without error. Not sure what the best approach would be here.

Steps to replicate

  1. Create a pipenv project:
$ mkdir foo
$ cd foo
$ pipenv install
  1. Delete the pipenv project:
$ cd ..
$ rm -rf foo
  1. Create a new project again:
$ mkdir foo
$ pipenv install
  1. You get an error:
Usage: pipenv install [OPTIONS] [PACKAGES]...

ERROR:: --system is intended to be used for pre-existing Pipfile installation, not installation of specific packages. Aborting.
$ pipenv --support

Pipenv version: '2022.4.8'

Pipenv location: '/opt/homebrew/Cellar/pipenv/2022.4.8/libexec/lib/python3.10/site-packages/pipenv'

Python location: '/opt/homebrew/Cellar/pipenv/2022.4.8/libexec/bin/python3.10'

Python installations found:

  • 3.9.12: /opt/homebrew/bin/python3
  • 3.9.12: /opt/homebrew/bin/python3.9
  • 3.8.9: /usr/bin/python3

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.10.2',
 'os_name': 'posix',
 'platform_machine': 'arm64',
 'platform_python_implementation': 'CPython',
 'platform_release': '21.4.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT '
                     '2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101',
 'python_full_version': '3.10.2',
 'python_version': '3.10',
 'sys_platform': 'darwin'}

System environment variables:

  • PATH
  • MANPATH
  • NIX_PROFILES
  • TERM_PROGRAM
  • _P9K_TTY
  • SHELL
  • TERM
  • HOMEBREW_REPOSITORY
  • TMPDIR
  • PYPI_SERVER_PASSWORD
  • TERM_PROGRAM_VERSION
  • PIPENV_SYSTEM
  • TERM_SESSION_ID
  • USER
  • SSH_AUTH_SOCK
  • _
  • __CFBundleIdentifier
  • PWD
  • JAVA_HOME
  • P9K_SSH
  • BASE16_THEME
  • P9K_TTY
  • XPC_FLAGS
  • NIX_SSL_CERT_FILE
  • XPC_SERVICE_NAME
  • PYPI_SERVER_USER
  • SHLVL
  • HOME
  • HOMEBREW_PREFIX
  • LOGNAME
  • LC_CTYPE
  • INFOPATH
  • HOMEBREW_CELLAR
  • __CF_USER_TEXT_ENCODING
  • PIP_SHIMS_BASE_MODULE
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_SYSTEM: 0

Debug–specific environment variables:

  • PATH: /opt/homebrew/Cellar/pipenv/2022.4.8/libexec/tools:/Users/ajeet.dsouza/.deno/bin:/Users/ajeet.dsouza/.local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/ajeet.dsouza/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ajeet.dsouza/.cargo/bin:/Users/ajeet.dsouza/.local/bin
  • SHELL: /bin/zsh
  • PWD: /Users/ajeet.dsouza/ws/bot-detection

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:35
  • Comments:36

github_iconTop GitHub Comments

143reactions
MdShihabAhmedcommented, Apr 25, 2022

There exists another folder having same name of the deleted folder in the beginning, under ‘.virtualenvs’ folder.

pipenv --venv

This command will find the path of that folder. Then deleting that folder fixed the issue.

59reactions
Alireza-RSTcommented, Apr 19, 2022

I solve this by removing the previous virtualenv.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker error with pipenv on django app: Warning: --system is ...
ERROR:: --system is intended to be used for pre-existing Pipfile installation, not installation of specific packages. Aborting.
Read more >
Warning: --system is intended to be used for pre-e - YouTube
Django : Docker error with pipenv on django app: Warning: -- system is intended to be used for pre-existing Pipfile [ Beautify Your...
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
Here, you'll learn how to troubleshoot Pipenv installation and locking issues. ... Pipfile won't lock when it tries to install packages that don't...
Read more >
pipenvでpipenv install throws --system is intended to be used ...
pipenv を触り始めて試行錯誤していたら環境を壊してしまったようで、同名のフォルダを再作成してもうまくいかず、pipenv install throws --system is ...
Read more >
[Example code]-I can't do anything with pipenv
ERROR :: --system is intended to be used for pre-existing Pipfile installation, not installation of specific packages. Aborting. I can't use pipenv in ......
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