Poetry fails to install on macOS High Sierra using Homebrew Python 3
See original GitHub issuePoetry fails to install on macOS High Sierra (10.13.4) using Homebrew Python 3 (3.6.5).
$ curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3
Retrieving metadata
Installing version: 0.8.5
- Getting dependencies
An error has occured: Command '('python', '-m', 'pip', 'install', 'poetry==0.8.5', '--target', '/var/folders/zk/1bgll_755dddcqh6snjdsmt00000gn/T/poetry-installer-ra11xs2z/dist')' returned non-zero exit status 1.
b'/usr/bin/python: No module named pip\n'
The reason this happens is the Installer.call()
method has python
hardcoded as the Python executable name. In my opinion, this is a soft violation of PEP 394. To solve this problem, call sys.executable
to obtain the filesystem location of the version of Python running the get-poetry.py
script.
Pull request #60 has a suggested fix.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:16 (12 by maintainers)
Top Results From Across the Web
poetry installation failing on Mac OS, says ... - Stack Overflow
In my case, the problem was the global version of python set by pyenv was not python 3.x. So pyenv global 3.x.x. fixed...
Read more >Installing Python 3 on Mac OS X
The latest version of Mac OS X, High Sierra, comes with Python 2.7 out of the box. You do not need to install...
Read more >homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter
aacgain 1.8 AAC‑supporting version of mp3gain
aalib 1.4rc5 Portable ASCII art graphics library
aamath 0.3 Renders mathematical expressions as ASCII art
Read more >Remove and Reinstall Python on Mac -- Can I trust these old ...
I am using macOS version 10.12.6 and simply uninstalling and re-installing worked for me: brew uninstall --ignore-dependencies python3.
Read more >An Effective Python Environment: Making Yourself at Home
If you install WSL, then you can use zsh , bash , or any other Unix-like shell. ... As of this writing, macOS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I appear to be having the same issue. Here is the command being run (ran?)… runded (that’s definitely right):
And the error being output:
This StackOverflow post fixed my issue but I am not sure I like the fix since it’s a system wide setting but I don’t know enough about the context around pip/homebrew to come up with another workaround. I am using your version of
get_poetry.py
, @lgw4 .I don’t really have much helpful input. Only saying I was also affected.
@pawelad Unfortunately, installing
pipsi
on macOS using Python 3 from Homebrew is also broken (perhaps for the same reasons; this is a problem with how the Homebrew packagers are configuring the Python installation).pipsi
can be made to work with Homebrew’s Python 3, but doing so is quite hacky. FWIW, I love the idea ofpipsi
and wish it was a default part of Python.