question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail to install with pip on MacOS 11.5.2 using Python 3.7.9

See original GitHub issue
❯ sudo pip install PyInquirer==1.0.3
WARNING: The directory '/Users/user/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Collecting PyInquirer==1.0.3
  Downloading PyInquirer-1.0.3.tar.gz (27 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-qqqdkx0s/pyinquirer_23b366c6d14e46e1a7f1380c04ab8b8a/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-qqqdkx0s/pyinquirer_23b366c6d14e46e1a7f1380c04ab8b8a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/pip-pip-egg-info-z5j0iug5
       cwd: /private/tmp/pip-install-qqqdkx0s/pyinquirer_23b366c6d14e46e1a7f1380c04ab8b8a/
  Complete output (13 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/__init__.py", line 19, in <module>
      from setuptools.dist import Distribution
    File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/dist.py", line 38, in <module>
      from setuptools import windows_support
    File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
      import ctypes
    File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/__init__.py", line 7, in <module>
      from _ctypes import Union, Structure, Array
  ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so, 2): Library not loaded: /opt/local/lib/libffi.7.dylib
    Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ctypes.cpython-37m-darwin.so
    Reason: image not found
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fb/4c/434b7c454010a284b49d6f1d446fe8dc5960415613d8c0225b9e2efb6724/PyInquirer-1.0.3.tar.gz#sha256=c9a92d68d7727fbd886a7908c08fd9e9773e5dc211bf5cbf836ba90d366dee51 (from https://pypi.org/simple/pyinquirer/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement PyInquirer==1.0.3 (from versions: 1.0.0, 1.0.2, 1.0.3)
ERROR: No matching distribution found for PyInquirer==1.0.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
guedesfelipecommented, Nov 1, 2021

if it worked, you can close the issue

1reaction
douglaslassancecommented, Oct 31, 2021

Found people talking about this here. sudo ln /opt/local/lib/libffi.8.dylib /opt/local/lib/libffi.7.dylib fixed it for me. Not sure how this lib got to be missing in the first place.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyEnv BUILD FAILED installing Python on MacOS
While trying to install Python 3.6.6 (for Airflow ) using PyEnv on MacOS , I am encountering build failure with following stack-trace
Read more >
Unable to install 3.7.9 using pyenv 2.2.5 on MacOS Monterey ...
However, I was unable to fix this problem. $pyenv install 3.7.9 python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Installing ......
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 >
Install python 3.8.0 via pyenv on BigSur(macOS 11.0) | by koji
In this article, I will show you how I could install python via pyenv on BigSur. Of course, you can use anyenv to...
Read more >
Installation — detectron2 0.6 documentation
After having them, run: python -m pip install 'git+https://github.com/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found