First time here? Check out the FAQ!

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 3 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 3 years ago

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.

Preview: (hide)
link

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 ( 3 years ago )

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 ( 3 years ago )

Further advice much appreciated.

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

takashi gravatar imagetakashi ( 3 years ago )

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 ( 3 years ago )

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 ( 3 years ago )

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: 3 years ago

Seen: 489 times

Last updated: Jun 25 '21