Skip to content

Can't build _hashlib and _ssl optional modules using brew install on Mac OS X #93695

Closed
@izumiberat

Description

@izumiberat

Documentation
Mac OS Catalina 10.15.7.

I am getting the following message when following the documentation here: https://devguide.python.org/setup/#install-dependencies and running make -s -j2

The necessary bits to build these optional modules were not found:
_hashlib _ssl
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

Could not build the ssl module!
Python requires a OpenSSL 1.1.1 or newer

For some reason, specifying the openssl version in the command line provided in the documentation resolved the issue:
brew install openssl@1.1 xz gdbm
As mentioned by @ezio-melotti in the PR python/devguide#891, it is awkward to have to specify the version of openssl as it should by default install the latest version. It nevertheless did the trick for me. As a test, I uninstalled openssl, and installed it again, without specifying the version in the command line, and this time it worked. It is unclear to me why, certainly some files that were created when installing the specific version.

I am therefore creating PR python/devguide#892 suggesting to specify the version if user faces this current issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions