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

poetry self update cannot find pip #5187

Closed
1 of 3 tasks
miquecg opened this issue Feb 11, 2022 · 3 comments
Closed
1 of 3 tasks

poetry self update cannot find pip #5187

miquecg opened this issue Feb 11, 2022 · 3 comments
Labels
kind/bug Something isn't working as expected

Comments

@miquecg
Copy link

miquecg commented Feb 11, 2022

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

It looks like -vvv doesn't work with this and other commands.

  • Arch Linux
  • Poetry 1.1.12

Issue

When trying to update Poetry to latest version I get a FileNotFoundError complaining about pip. Poetry was installed using https://install.python-poetry.org script.

Updating Poetry to 1.1.13

Updating dependencies
Resolving dependencies... (0.3s)

Package operations: 30 installs, 2 updates, 0 removals

  - Installing certifi (2021.10.8)

  FileNotFoundError

  [Errno 2] No such file or directory: 'pip'

  at /usr/lib/python3.10/subprocess.py:1842 in _execute_child
      1838│                     else:
      1839│                         err_filename = orig_executable
      1840│                     if errno_num != 0:
      1841│                         err_msg = os.strerror(errno_num)
    → 1842│                     raise child_exception_type(errno_num, err_msg, err_filename)
      1843│                 raise child_exception_type(err_msg)
      1844│ 
      1845│ 
      1846│         def _handle_exitstatus(self, sts,

pip exists inside Poetry virtualenv.

❯ l .local/share/pypoetry/venv/bin
total 108K
drwxr-xr-x  266 dic 13 18:13 .
drwxr-xr-x   76 dic 13 18:13 ..
-rw-r--r-- 2,0K dic 13 18:13 activate
-rw-r--r--  930 dic 13 18:13 activate.csh
-rw-r--r-- 2,1K dic 13 18:13 activate.fish
-rw-r--r-- 8,9K dic 13 18:13 Activate.ps1
-rwxr-xr-x  248 dic 13 18:13 doesitcache
-rwxr-xr-x  242 dic 13 18:13 keyring
-rwxr-xr-x  276 dic 13 18:13 normalizer
-rwxr-xr-x  253 dic 13 18:13 pip
-rwxr-xr-x  253 dic 13 18:13 pip3
-rwxr-xr-x  253 dic 13 18:13 pip3.10
-rwxr-xr-x  250 dic 13 18:13 pkginfo
-rwxr-xr-x  245 dic 13 18:13 poetry
-rwxr-xr-x  14K dic 13 18:13 python
-rwxr-xr-x  14K dic 13 18:13 python3
-rwxr-xr-x  14K dic 13 18:13 python3.10
-rwxr-xr-x  270 dic 13 18:13 virtualenv
@miquecg miquecg added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 11, 2022
@alecandido
Copy link

I'm not 100% sure, but since it's using subprocess to call pip, I believe you need pip in the environment in which you are the moment you call poetry from shell.

Can you try to run poetry from inside an environment in which you actually have pip. Or even better, can you try installing pip user wide?

@miquecg
Copy link
Author

miquecg commented Feb 15, 2022

In fact Poetry does have a pip installed on its own virtualenv, but for some reason it wasn't finding it, which finally led me to PR #5048.

Manually applying those changes allowed Poetry to update without any further problems. Good to know if anyone else stumbles upon this.

Thanks for showing up to help 👍

@miquecg miquecg closed this as completed Feb 15, 2022
@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants