You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR; I want to use pipenv to manage package installed in system interpreter, because I'm using docker for local development.
Context
Using docker instead of virtualenv for local development is getting more popular. I want to use pipenv for managing dependencies in project, so in my Dockerfile I have a line:
RUN pipenv install --deploy --dev --system
which installs packages already listed in Pipfile/Pipfile.lock
Problem
Now let's say I want to install ipython in my project:
And it throws an error: ERROR:: --system is intended to be used for pre-existing Pipfile installation, not installation of specific packages. Aborting.
Describe the solution you'd like
I would like Pipenv to be able to manage packages in system interpreter.
Also an option to always use system interpreter when PIPENV_SYSTEM=True would be nice. It will still allow me to install project as virtualenv locally without docker and for docker setup only thing to add would be:
environment:
- PIPENV_SYSTEM=True
in docker-compose.yml
Describe alternatives you've considered
I know I can allow Pipenv to create virtualenv and install new packages easily, but it adds complexity and then running every command will look like: docker-compose exec backend pipenv run ./manage.py createsuperuser instead of just docker-compose exec backend ./manage.py createsuperuser
If starting from scratch then I can do a regular pipenv install to get a Pipfile.lock,
but then when I pipenv install --system it doesn't install anything
(despite saying Installing dependencies from Pipfile.lock).
If I subsequently rm -r ~/.local/share/virtualenvs/ (I am in Python Codespace)
and then pipenv install --system again it will install,
albeit emitting:
Failed to load paths: /bin/sh: 1: /home/vscode/.local/share/virtualenvs/dataclasses-configobj-HheCbY6G/bin/python: not found
TLDR; I want to use pipenv to manage package installed in
system
interpreter, because I'm using docker for local development.Context
Using docker instead of virtualenv for local development is getting more popular. I want to use pipenv for managing dependencies in project, so in my Dockerfile I have a line:
which installs packages already listed in Pipfile/Pipfile.lock
Problem
Now let's say I want to install
ipython
in my project:And it throws an error:
ERROR:: --system is intended to be used for pre-existing Pipfile installation, not installation of specific packages. Aborting.
Describe the solution you'd like
I would like Pipenv to be able to manage packages in system interpreter.
Also an option to always use system interpreter when
PIPENV_SYSTEM=True
would be nice. It will still allow me to install project as virtualenv locally without docker and for docker setup only thing to add would be:in docker-compose.yml
Describe alternatives you've considered
I know I can allow Pipenv to create virtualenv and install new packages easily, but it adds complexity and then running every command will look like:
docker-compose exec backend pipenv run ./manage.py createsuperuser
instead of justdocker-compose exec backend ./manage.py createsuperuser
Additional context
$ pipenv --support
Pipenv version:
'2018.11.26'
Pipenv location:
'/usr/local/lib/python3.8/site-packages/pipenv'
Python location:
'/usr/local/bin/python'
Python installations found:
3.8.0
:/usr/local/bin/python
3.7.3
:/usr/bin/python3
3.7.3
:/usr/bin/python3.7m
PEP 508 Information:
System environment variables:
REDIS_URL
PYTHONUNBUFFERED
POSTGRES_HOST
HOSTNAME
PYTHON_VERSION
POSTGRES_PASSWORD
ALLOWED_HOSTS
DJANGO_SECRET_KEY
PWD
LINES
HOME
LANG
COLUMNS
GPG_KEY
DJANGO_SETTINGS_MODULE
TERM
SHLVL
POSTGRES_USER
PYTHON_PIP_VERSION
REACT_APP_API
PYTHON_GET_PIP_SHA256
PYTHON_GET_PIP_URL
PATH
DEBUG
POSTGRES_DB
_
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
:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG
:C.UTF-8
PWD
:/app
Contents of
Pipfile
('/app/Pipfile'):Contents of
Pipfile.lock
('/app/Pipfile.lock'):The text was updated successfully, but these errors were encountered: