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 ( ... 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/'"'"'; __file__='"'"'/private/tmp/pip-install-qqqdkx0s/pyinquirer_23b366c6d14e46e1a7f1380c04ab8b8a/'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code ='"'"'\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/", 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/", 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/", line 2, in <module>
      import ctypes
    File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ctypes/", 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/, 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/
    Reason: image not found
WARNING: Discarding (from Command errored out with exit status 1: python 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

guedesfelipecommented, Nov 1, 2021

if it worked, you can close the issue

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 · 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+ ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found