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

Error when checking Python runtime #6245

Closed
yosufali opened this issue Sep 16, 2024 · 0 comments · Fixed by #6246
Closed

Error when checking Python runtime #6245

yosufali opened this issue Sep 16, 2024 · 0 comments · Fixed by #6246

Comments

@yosufali
Copy link
Contributor

yosufali commented Sep 16, 2024

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.

Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.

Make sure to mention your debugging experience if the documented solution failed.

Issue description

There is a simple refactoring error which I've found in pipenv/utils/virtualenv.py.

I tried to install dependencies to an env I've just created as follows:

pipenv run pip install -r requirements.txt

Expected result

It should install the libraries or give a useful error.

Actual result

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/__main__.py", line 4, in <module>
    cli()
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/cli/options.py", line 52, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/cli/command.py", line 422, in run
    do_run(
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/routines/shell.py", line 68, in do_run
    ensure_project(
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/utils/project.py", line 48, in ensure_project
    ensure_virtualenv(
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/utils/virtualenv.py", line 134, in ensure_virtualenv
    python = ensure_python(project, python=python)
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/utils/virtualenv.py", line 254, in ensure_python
    abort("Neither 'pyenv' nor 'asdf' could be found to install Python.")
  File "/home/yosuf/.local/lib/python3.10/site-packages/pipenv/utils/virtualenv.py", line 208, in abort
    f"[yellow]$ pipenv --python {os.sep.join('path', 'to', 'python')}[/yellow]"
TypeError: str.join() takes exactly one argument (3 given)

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

Try to install any library as follows:

python -m pipenv run pip install boto3

or simply type the following in a new directory:

pipenv shell

Pipefile:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
boto3 = "*"

[dev-packages]

[requires]
python_version = "3.10"

@yosufali yosufali mentioned this issue Sep 16, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant