Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
izumiberat opened this issue Jun 10, 2022 · 1 comment
Labels
docs Documentation in the Doc dir

Comments

@izumiberat
Copy link

izumiberat commented Jun 10, 2022

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.

@izumiberat izumiberat added the docs Documentation in the Doc dir label Jun 10, 2022
izumiberat added a commit to izumiberat/devguide that referenced this issue Jun 10, 2022
I am using Mac OS Catalina 10.15.7.

To avoid getting the following messages : 
> The necessary bits to build these optional modules were not found:
> _hashlib              _ssl   
as well as:
> Could not build the ssl module!
> Python requires a OpenSSL 1.1.1 or newer

Running `brew install openssl@3` allowed the  _hashlib _ssl modules to build, but as suggested in a comment by @ezio-melotti it seemed strange that the version needed to be specified. 

I am therefore updating the documentation by leaving 
`brew install openssl` rather than `brew install openssl@3 ` but I am adding a note saying that if user gets the message 
> Could not build the ssl module!
> Python requires a OpenSSL 1.1.1 or newer
that they can try specifying the version of OpenSSL by using `brew install openssl@3`.

Issue number: python/cpython#93695
@erlend-aasland
Copy link
Contributor

Fixed by python/devguide#892. Thanks for the report and the PR, Izumi :)

kitarefake added a commit to kitarefake/devguide that referenced this issue Jul 15, 2024
…brew (#892)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants