Ask Your Question
1

I can't use pip to add a python toolbox due to the mac openSSL problem. What is the current best work around?

asked 2021-06-25 05:02:22 +0100

takashi gravatar image

I want to install qutip, which is a quantum mechanics toolkit.

I can't install it using pip because of the mac openSSL problem.

None of the workarounds I have found online have worked for me.

I tried installing my own copy of python 3 using home-brew, and then successfully installed qutip, only to discover that sage math uses its own copy of python 3 located in a different directory.

Is there a way for me to manually install the toolkit based on how pip successfully installed it on my own copy of python 3?

Is there another workaround?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-06-25 09:55:17 +0100

slelievre gravatar image

Sage 9.3 should no longer have this problem on macOS.

So your options include the following.

Either way, installing with sage --pip install will then become possible.

edit flag offensive delete link more

Comments

I can't use Sage 9.3 because I'm running High Sierra, so I followed READ_ME directions to install patch.

I navigated to the correct directory: "cd /Users/ssalser/Downloads/fix_mac_sage-master/" I installed the patch: "/Applications/SageMath-9.1.app/sage -python -m fix_mac_sage9.fix"

Terminal output: "Installing Tk 8.6.10 in /Library/Frameworks -- please choose the defaults." "The file /Users/ssalser/Downloads/fix_mac_sage-master/fix_mac_sage9/TclTk-8.6.10.pkg does not exist." "Adding the _tkinter and _ssl modules to Sage' "Rewriting id and dependency paths in _ssl, libssl and libcrypto."

After doing this I typed in "/Applications/SageMath-9.1.app/sage -python -m pip install qutip"

The terminal said: "pip is configured with locations that require TLS/SSL, however the ssl module...

takashi gravatar imagetakashi ( 2021-06-26 00:37:05 +0100 )edit

I also tried typing this: "/Applications/SageMath-9.1.app/sage --pip install qutip"

But got the same message: "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available."

takashi gravatar imagetakashi ( 2021-06-26 00:40:25 +0100 )edit

Further advice much appreciated.

By the way, am I supposed to communicate using comments, or in a different way?

takashi gravatar imagetakashi ( 2021-06-26 00:43:02 +0100 )edit

Yes, comments work for the discussion.

First, run this in a terminal to place a symlink to the Sage executable in your PATH:

ln -s /Applications/SageMath-9.1.app/sage /usr/local/bin

or if that does not work, then same with sudo:

sudo ln -s /Applications/SageMath-9.1.app/sage /usr/local/bin

and enter the password for your account on that Mac when prompted.

Then you can type sage instead of /Applications/SageMath-9.1.app/sage.

slelievre gravatar imageslelievre ( 2021-06-26 04:13:33 +0100 )edit

Then try this:

sage -i openssl
sage -f python3

This will rebuild a lot of things and take some time. But if it succeeds you will be able to use pip.

slelievre gravatar imageslelievre ( 2021-06-26 04:19:07 +0100 )edit

But really, if you have homebrew, I would suggest installing Sage 9.3 from source.

slelievre gravatar imageslelievre ( 2021-06-26 04:21:27 +0100 )edit

sage -i openssl took a long time, but it seemed to work sage -f python 3 yielded an "Error building Sage." "make: * [python3] Error 1"

will Sage 9.3 work in High Sierra if I build it from source?

( the reason I installed Sage 9.1 is because the Sage 9.2 and 9.3 prebuilt applications seemed to require a more advanced OS. )

takashi gravatar imagetakashi ( 2021-06-26 07:40:22 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2021-06-25 05:02:22 +0100

Seen: 420 times

Last updated: Jun 25 '21