Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv install --system fails with RuntimeError: location not created nor specified on version 2024.3.0 #6296

Closed
Nico-Guyon opened this issue Oct 30, 2024 · 6 comments · Fixed by #6297
Labels
Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. Type: Duplicate This issue is a duplicate of an already-existing issue. Type: Regression This issue is a regression of a previous behavior.

Comments

@Nico-Guyon
Copy link

Nico-Guyon commented Oct 30, 2024

Issue description

pipenv install --system fails with RuntimeError: location not created nor specified
It's working fine with version 2024.2.0 but fails with version 2024.3.0

Expected result

It should install the packages into the system site-packages like version 2024.2.0

Actual result

fails with RuntimeError: location not created nor specified

root@eb798f172420:/# pipenv install --system
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/cli/options.py", line 52, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/cli/command.py", line 207, in install
    do_install(
  File "/usr/local/lib/python3.11/site-packages/pipenv/routines/install.py", line 309, in do_install
    new_packages, _ = handle_new_packages(
                      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/routines/install.py", line 114, in handle_new_packages
    do_update(
  File "/usr/local/lib/python3.11/site-packages/pipenv/routines/update.py", line 51, in do_update
    ensure_project(
  File "/usr/local/lib/python3.11/site-packages/pipenv/utils/project.py", line 96, in ensure_project
    os.environ["PIP_PYTHON_PATH"] = project.python(system=system)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/project.py", line 1418, in python
    return project_python(self, system=system)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/utils/shell.py", line 408, in project_python
    python = project._which("python")
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pipenv/project.py", line 1427, in _which
    raise RuntimeError("location not created nor specified")
RuntimeError: location not created nor specified

Steps to replicate

pipenv install --system with pipenv version 2024.3.0

@unclekhalifa
Copy link

unclekhalifa commented Oct 30, 2024

I am experiencing the same issue. Pinning the version to 2024.2.0 did the trick.

FROM python:3.11

...

# install dependencies
RUN python3 -m pip install -U pip && pip install pipenv==2024.2.0

@Nico-Guyon
Copy link
Author

I did the exact same thing, sticking with 2024.2.0 for now

@matteius
Copy link
Member

Huh, we have a single test of --syststem flag but it also has --deploy -- I wonder if pipenv install --system --deploy would work as-is? I'll have to look into this more, but probably won't have time today.

@matteius matteius added Type: Regression This issue is a regression of a previous behavior. Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. Type: Duplicate This issue is a duplicate of an already-existing issue. labels Oct 30, 2024
@matteius
Copy link
Member

I just opened #6297 -- if you could give it a whirl that would help validate it. I also added a test.

@matteius
Copy link
Member

2024.3.1 has been cut

@CristhianUlloa
Copy link

Thank you for the quick turnaround on this! Picked up the patch this morning and things are working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Candidate The issue has been identified/triaged and contributions are welcomed/encouraged. Type: Duplicate This issue is a duplicate of an already-existing issue. Type: Regression This issue is a regression of a previous behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants