pip install from MacOS
See original GitHub issueI often find myself installing on my MacOS development machine a bunch of dependencies of a Python project that includes dumb-init. The installation fails with:
$ pip install -r requirements.txt
[...]
Collecting dumb-init
Using cached dumb-init-1.2.0.tar.gz
Installing collected packages: dumb-init
Running setup.py install for dumb-init ... error
Complete output from command /private/tmp/foo/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='dumb-init/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record install-record.txt --single-version-externally-managed --compile --install-headers /private/tmp/foo/venv/include/site/python3.6/dumb-init:
running install
running build
running build_cexe
creating build
creating build/temp.macosx-10.6-intel-3.6
cc -c dumb-init.c -o build/temp.macosx-10.6-intel-3.6/dumb-init.o
creating build/scripts-3.6
cc build/temp.macosx-10.6-intel-3.6/dumb-init.o -o build/scripts-3.6/dumb-init -static
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
Because the C compiler does not support -static
on MacOS, the installation of the dependencies fails.
Removing the -static
flag from the Makefile allows to compile and use dumb-init just fine. Is there any tip to compile the package from PyPI on MacOS? Thanks!
MacOS 10.12.6 Clang Apple LLVM version 9.0.0 (clang-900.0.38) Python 3.6.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to install pip in macOS ? - GeeksforGeeks
Download and Install Pip on macOS. pip can be downloaded and installed usingthe command line by going through the following steps: · Verification ......
Read more >How to Install Pip on Mac - phoenixNAP
Install Pip on macOS via get-pip.py · 1. Press Command + Space Bar and type in Terminal. Click the app icon to open...
Read more >How to Install PIP on Mac - Linux Hint
PIP is a Python package manager which can be installed using multiple methods on a Mac. This article mentions 4 different methods to...
Read more >How do I install pip on macOS or OS X? - Stack Overflow
macOS comes with Python 2, but not with pip . Anyway, it's better to manage it with Homebrew. You must install it before....
Read more >Installation - pip documentation v22.3.1
Python comes with an ensurepip module1, which can install pip in a Python environment. Linux. $ python -m ensurepip --upgrade ... Windows, Linux...
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 Free
Top 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
I had a patch at some point to exclude
-static
on macos, the actual important line is here: https://github.com/Yelp/dumb-init/blob/2132d82bde8cf8e5ee132d5bc136d62937ed2d3f/setup.py#L117perhaps we can revive that patch!
It works perfectly, thanks!