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.Wed, 12 Aug 2020 01:12:31 +0200Sage pip not compatible with PyPIhttps://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/I want to make a PyPI package for sage, similar to
https://pypi.python.org/pypi/darmonpoints/
or
https://pypi.python.org/pypi/surface_dynamics/
that can be installed by anyone by typing one line. But trying these out, the installation instructions don't work! I get an error:
$~/SageMath/sage -pip install surface_dynamics
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting surface_dynamics
Could not fetch URL https://pypi.python.org/simple/surface-dynamics/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement surface_dynamics (from versions: )
No matching distribution found for surface_dynamics
I believe that it is because sage is using pip 8.x, and a later version is required for PyPI. If I try installing surface_dynamics with using pip 9.01, it downloads it (but gives an error later because it is not in sage), so I do think the version is a problem.
I just updated to sage 8.0. Is this planning to be fixed soon? If there is a workaround for me, I guess that is nice, but it defeats the purpose of getting my code hosted on PyPI if I still have to give the users complicated instructions.
Or maybe my sage installation is broken? Do others get the same error?
EDIT:
In light of eric_g's answer, I tried installing the developer version of 8.1. Indeed the sage pip is now 9.01, but the same error persists. So I guess my theory about the versions is wrong. It must be something else funny with the sage pip?Thu, 07 Sep 2017 07:13:34 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/Comment by Emmanuel Charpentier for <p>I want to make a PyPI package for sage, similar to </p>
<p><a href="https://pypi.python.org/pypi/darmonpoints/">https://pypi.python.org/pypi/darmonpo...</a></p>
<p>or</p>
<p><a href="https://pypi.python.org/pypi/surface_dynamics/">https://pypi.python.org/pypi/surface_...</a></p>
<p>that can be installed by anyone by typing one line. But trying these out, the installation instructions don't work! I get an error:</p>
<pre><code>$~/SageMath/sage -pip install surface_dynamics
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting surface_dynamics
Could not fetch URL https://pypi.python.org/simple/surface-dynamics/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement surface_dynamics (from versions: )
No matching distribution found for surface_dynamics
</code></pre>
<p>I believe that it is because sage is using pip 8.x, and a later version is required for PyPI. If I try installing surface_dynamics with using pip 9.01, it downloads it (but gives an error later because it is not in sage), so I do think the version is a problem.</p>
<p>I just updated to sage 8.0. Is this planning to be fixed soon? If there is a workaround for me, I guess that is nice, but it defeats the purpose of getting my code hosted on PyPI if I still have to give the users complicated instructions.</p>
<p>Or maybe my sage installation is broken? Do others get the same error?</p>
<p>EDIT:
In light of eric_g's answer, I tried installing the developer version of 8.1. Indeed the sage pip is now 9.01, but the same error persists. So I guess my theory about the versions is wrong. It must be something else funny with the sage pip?</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=47989#post-id-47989In order to get SSL support in `pip`, you must recompile `pip` **and** Sage's Python interpreters after installing the development library(ies ?) for OpenSSL. It's usually easier and faster to start from scratch (i. e. `make distclean`).
Also, I seem to remember that Mac OS X plays shenanigans with SSL, but I don't have details in ming. I have ranted a bit about OpenSSL support on sage-devel, and there is a few ickets on Trac. Look for Dima Pasechnik's comments : he knows what he's talking about...Fri, 20 Sep 2019 10:11:05 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=47989#post-id-47989Answer by eric_g for <p>I want to make a PyPI package for sage, similar to </p>
<p><a href="https://pypi.python.org/pypi/darmonpoints/">https://pypi.python.org/pypi/darmonpo...</a></p>
<p>or</p>
<p><a href="https://pypi.python.org/pypi/surface_dynamics/">https://pypi.python.org/pypi/surface_...</a></p>
<p>that can be installed by anyone by typing one line. But trying these out, the installation instructions don't work! I get an error:</p>
<pre><code>$~/SageMath/sage -pip install surface_dynamics
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting surface_dynamics
Could not fetch URL https://pypi.python.org/simple/surface-dynamics/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement surface_dynamics (from versions: )
No matching distribution found for surface_dynamics
</code></pre>
<p>I believe that it is because sage is using pip 8.x, and a later version is required for PyPI. If I try installing surface_dynamics with using pip 9.01, it downloads it (but gives an error later because it is not in sage), so I do think the version is a problem.</p>
<p>I just updated to sage 8.0. Is this planning to be fixed soon? If there is a workaround for me, I guess that is nice, but it defeats the purpose of getting my code hosted on PyPI if I still have to give the users complicated instructions.</p>
<p>Or maybe my sage installation is broken? Do others get the same error?</p>
<p>EDIT:
In light of eric_g's answer, I tried installing the developer version of 8.1. Indeed the sage pip is now 9.01, but the same error persists. So I guess my theory about the versions is wrong. It must be something else funny with the sage pip?</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38747#post-id-38747pip 9.0.1 will be available in Sage 8.1 (cf. the ticket [#23615](https://trac.sagemath.org/ticket/23615), which has been merged in Sage 8.1.beta4). If you want to use it right now, you have to use the develop version of Sage:
git clone https://github.com/sagemath/sage.git
cd sage
git checkout -b develop
git pull origin develop
MAKE="make -j8" make
Thu, 07 Sep 2017 10:55:41 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38747#post-id-38747Comment by paragon for <p>pip 9.0.1 will be available in Sage 8.1 (cf. the ticket <a href="https://trac.sagemath.org/ticket/23615">#23615</a>, which has been merged in Sage 8.1.beta4). If you want to use it right now, you have to use the develop version of Sage: </p>
<pre><code>git clone https://github.com/sagemath/sage.git
cd sage
git checkout -b develop
git pull origin develop
MAKE="make -j8" make
</code></pre>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=38753#post-id-38753Thank you! This is what I was hoping for. But unfortunately it didn't fix the problem (see edit).Thu, 07 Sep 2017 22:20:02 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=38753#post-id-38753Answer by tmonteil for <p>I want to make a PyPI package for sage, similar to </p>
<p><a href="https://pypi.python.org/pypi/darmonpoints/">https://pypi.python.org/pypi/darmonpo...</a></p>
<p>or</p>
<p><a href="https://pypi.python.org/pypi/surface_dynamics/">https://pypi.python.org/pypi/surface_...</a></p>
<p>that can be installed by anyone by typing one line. But trying these out, the installation instructions don't work! I get an error:</p>
<pre><code>$~/SageMath/sage -pip install surface_dynamics
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting surface_dynamics
Could not fetch URL https://pypi.python.org/simple/surface-dynamics/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement surface_dynamics (from versions: )
No matching distribution found for surface_dynamics
</code></pre>
<p>I believe that it is because sage is using pip 8.x, and a later version is required for PyPI. If I try installing surface_dynamics with using pip 9.01, it downloads it (but gives an error later because it is not in sage), so I do think the version is a problem.</p>
<p>I just updated to sage 8.0. Is this planning to be fixed soon? If there is a workaround for me, I guess that is nice, but it defeats the purpose of getting my code hosted on PyPI if I still have to give the users complicated instructions.</p>
<p>Or maybe my sage installation is broken? Do others get the same error?</p>
<p>EDIT:
In light of eric_g's answer, I tried installing the developer version of 8.1. Indeed the sage pip is now 9.01, but the same error persists. So I guess my theory about the versions is wrong. It must be something else funny with the sage pip?</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38771#post-id-38771It is likely you complied Sage's Python without SSL support. Could you try to recompile it with `libssl-dev` package installed (or similar package depending on your distro) ?Sat, 09 Sep 2017 14:53:43 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38771#post-id-38771Comment by paragon for <p>It is likely you complied Sage's Python without SSL support. Could you try to recompile it with <code>libssl-dev</code> package installed (or similar package depending on your distro) ?</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=38806#post-id-38806I'm using a MacBook with OS X 10.12.5. Apparently it doesn't come with SSL support: https://github.com/saghul/pythonz/issues/125. I have now installed opensll and rebuild sage 8.0. I still get the same error. At least I know that it is a problem with my computer and not with sage.Tue, 12 Sep 2017 18:52:48 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=38806#post-id-38806Answer by slelievre for <p>I want to make a PyPI package for sage, similar to </p>
<p><a href="https://pypi.python.org/pypi/darmonpoints/">https://pypi.python.org/pypi/darmonpo...</a></p>
<p>or</p>
<p><a href="https://pypi.python.org/pypi/surface_dynamics/">https://pypi.python.org/pypi/surface_...</a></p>
<p>that can be installed by anyone by typing one line. But trying these out, the installation instructions don't work! I get an error:</p>
<pre><code>$~/SageMath/sage -pip install surface_dynamics
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting surface_dynamics
Could not fetch URL https://pypi.python.org/simple/surface-dynamics/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement surface_dynamics (from versions: )
No matching distribution found for surface_dynamics
</code></pre>
<p>I believe that it is because sage is using pip 8.x, and a later version is required for PyPI. If I try installing surface_dynamics with using pip 9.01, it downloads it (but gives an error later because it is not in sage), so I do think the version is a problem.</p>
<p>I just updated to sage 8.0. Is this planning to be fixed soon? If there is a workaround for me, I guess that is nice, but it defeats the purpose of getting my code hosted on PyPI if I still have to give the users complicated instructions.</p>
<p>Or maybe my sage installation is broken? Do others get the same error?</p>
<p>EDIT:
In light of eric_g's answer, I tried installing the developer version of 8.1. Indeed the sage pip is now 9.01, but the same error persists. So I guess my theory about the versions is wrong. It must be something else funny with the sage pip?</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38773#post-id-38773The error you report, as @tmonteil answered,
comes from using a Sage built without SSL support.
Lack of SSL support won't let you pip-install using
sage -pip install name_of_the_package
Instead, you can download it, extract it, and do
sage -pip install /path/to/the/downloaded/package
In addition, you could install openssl into your Sage installation as follows:
sage -i openssl
sage -f python2
sage -i pyopenssl
after which you should be able to `sage -pip install` any package you want.Sat, 09 Sep 2017 18:40:59 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=38773#post-id-38773Comment by BrentBaccala for <p>The error you report, as <a href="/users/1305/tmonteil/">@tmonteil</a> answered,
comes from using a Sage built without SSL support.</p>
<p>Lack of SSL support won't let you pip-install using</p>
<pre><code>sage -pip install name_of_the_package
</code></pre>
<p>Instead, you can download it, extract it, and do</p>
<pre><code>sage -pip install /path/to/the/downloaded/package
</code></pre>
<p>In addition, you could install openssl into your Sage installation as follows:</p>
<pre><code>sage -i openssl
sage -f python2
sage -i pyopenssl
</code></pre>
<p>after which you should be able to <code>sage -pip install</code> any package you want.</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=52953#post-id-52953Sage 9.0 switched to Python 3, so if you have a newer version of Sage use `sage -f python3` instead of `sage -f python2`Wed, 12 Aug 2020 01:12:31 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?comment=52953#post-id-52953Answer by geze for <p>I want to make a PyPI package for sage, similar to </p>
<p><a href="https://pypi.python.org/pypi/darmonpoints/">https://pypi.python.org/pypi/darmonpo...</a></p>
<p>or</p>
<p><a href="https://pypi.python.org/pypi/surface_dynamics/">https://pypi.python.org/pypi/surface_...</a></p>
<p>that can be installed by anyone by typing one line. But trying these out, the installation instructions don't work! I get an error:</p>
<pre><code>$~/SageMath/sage -pip install surface_dynamics
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting surface_dynamics
Could not fetch URL https://pypi.python.org/simple/surface-dynamics/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
Could not find a version that satisfies the requirement surface_dynamics (from versions: )
No matching distribution found for surface_dynamics
</code></pre>
<p>I believe that it is because sage is using pip 8.x, and a later version is required for PyPI. If I try installing surface_dynamics with using pip 9.01, it downloads it (but gives an error later because it is not in sage), so I do think the version is a problem.</p>
<p>I just updated to sage 8.0. Is this planning to be fixed soon? If there is a workaround for me, I guess that is nice, but it defeats the purpose of getting my code hosted on PyPI if I still have to give the users complicated instructions.</p>
<p>Or maybe my sage installation is broken? Do others get the same error?</p>
<p>EDIT:
In light of eric_g's answer, I tried installing the developer version of 8.1. Indeed the sage pip is now 9.01, but the same error persists. So I guess my theory about the versions is wrong. It must be something else funny with the sage pip?</p>
https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=47982#post-id-47982I had a similar result when installing psycopg2 in my own computer, and sudoing `pip install --upgrade psycopg2` solve my problem. I did not try without the option `--upgrade` for sage, but I also ran `sage -pip install --upgrade pyscopg2` and no problema!Fri, 20 Sep 2019 02:14:14 +0200https://ask.sagemath.org/question/38746/sage-pip-not-compatible-with-pypi/?answer=47982#post-id-47982