ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 27 Jun 2021 18:49:16 +0200I can't use pip to add a python toolbox due to the mac openSSL problem. What is the current best work around?https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/ 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?
Fri, 25 Jun 2021 05:02:22 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/Answer by slelievre for <p>I want to install qutip, which is a quantum mechanics toolkit.</p>
<p>I can't install it using pip because of the mac openSSL problem.</p>
<p>None of the workarounds I have found online have worked for me.</p>
<p>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.</p>
<p>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?</p>
<p>Is there another workaround?</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?answer=57741#post-id-57741Sage 9.3 should no longer have this problem on macOS.
So your options include the following.
- Install Sage 9.3 (recommended)
- On an older Sage version, use the `fix_mac_sage` script:
- [https://github.com/3-manifolds/fix_mac_sage](https://github.com/3-manifolds/fix_mac_sage)
to endow its Python with its SSL module.
Either way, installing with `sage --pip install` will then become possible.
Fri, 25 Jun 2021 09:55:17 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?answer=57741#post-id-57741Comment by takashi for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57790#post-id-57790When I try to go back to Sage 9.1 the application will no longer opens up. It gets stuck halfway through "verifying". I have tried downloading a copy of the app from a different server, but ran into the same problem. Is there something I need to uninstall or undo?Sun, 27 Jun 2021 18:49:16 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57790#post-id-57790Comment by takashi for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57782#post-id-57782I just discovered my computer is actually running Sierra, not High Sierra.
( The Sage-macOS app quits unexpectedly instead of working. )
Is there a way to get pip working in Sage 9.1? Should I try the fix_mac_sage script again?Sat, 26 Jun 2021 19:37:51 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57782#post-id-57782Comment by slelievre for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57777#post-id-57777The new Sage-macOS app should work with High Sierra.
- [home](https://github.com/3-manifolds/Sage_macOS)
- [releases](https://github.com/3-manifolds/Sage_macOS/releases)
Get the latest version from the releases page.
It supports SSL and installing extra packages with pip.
Building Sage 9.3 (or 9.4.beta3 if you feel more adventurous)
from source should also produce a working Sage on High Sierra.Sat, 26 Jun 2021 13:54:43 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57777#post-id-57777Comment by takashi for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57775#post-id-57775sage -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. )Sat, 26 Jun 2021 07:40:22 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57775#post-id-57775Comment by slelievre for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57774#post-id-57774But really, if you have homebrew, I would suggest installing Sage 9.3 from source.Sat, 26 Jun 2021 04:21:27 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57774#post-id-57774Comment by slelievre for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57773#post-id-57773Then 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.Sat, 26 Jun 2021 04:19:07 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57773#post-id-57773Comment by slelievre for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57772#post-id-57772Yes, 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`.Sat, 26 Jun 2021 04:13:33 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57772#post-id-57772Comment by takashi for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57771#post-id-57771Further advice much appreciated.
By the way, am I supposed to communicate using comments, or in a different way?Sat, 26 Jun 2021 00:43:02 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57771#post-id-57771Comment by takashi for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57770#post-id-57770I 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."Sat, 26 Jun 2021 00:40:25 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57770#post-id-57770Comment by takashi for <p>Sage 9.3 should no longer have this problem on macOS.</p>
<p>So your options include the following.</p>
<ul>
<li><p>Install Sage 9.3 (recommended)</p></li>
<li><p>On an older Sage version, use the <code>fix_mac_sage</code> script:</p>
<ul>
<li><a href="https://github.com/3-manifolds/fix_mac_sage">https://github.com/3-manifolds/fix_mac_sage</a></li>
</ul>
<p></p><p>to endow its Python with its SSL module.</p></li>
</ul><p></p>
<p>Either way, installing with <code>sage --pip install</code> will then become possible.</p>
https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57769#post-id-57769I 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...Sat, 26 Jun 2021 00:37:05 +0200https://ask.sagemath.org/question/57739/i-cant-use-pip-to-add-a-python-toolbox-due-to-the-mac-openssl-problem-what-is-the-current-best-work-around/?comment=57769#post-id-57769