pypa / pipenv

Python Development Workflow for Humans.
https://pipenv.pypa.io
MIT License
24.82k stars 1.86k forks source link

Be able to install without Pipfile #4958

Open Siecje opened 2 years ago

Siecje commented 2 years ago

Issue description

I can't install packages with just Pipfile.lock, I also need Pipfile.

During deployment I am doing.

PIP_NO_CACHE_DIR=false PIPENV_VENV_IN_PROJECT=true pipenv install --ignore-pipfile

It returns a 0 status code, creates a Pipfile file but doesn't install any packages.

.venv/bin/python -m pip freeze
# no output

Expected result

All packages in Pipfile.lock are installed. Pipfile file is not created.

Actual result

It returns a 0 status code, creates a Pipfile file but doesn't install any packages.

.venv/bin/python -m pip freeze
# no output
matteius commented 2 years ago

@Siecje pipenv install will try to lock from the Pipfile. What if you replace that part with pipenv sync which installs dependencies from the lock file?

matteius commented 2 years ago

@Siecje I just tested this and it turns out that pipenv sync won't install anything without the Pipfile, maybe because it doesn't know what is a package and what is a dev package without the Pipfile?

matteius commented 2 years ago

@Siecje What is the use case for not including the Pipfile as well during the build process?

Siecje commented 2 years ago

I didn't think I needed it, especially with --ignore-pipfile.

I assumed I only needed the one file when using pipenv.