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

Document sage installation method with pip #35070

Merged
merged 10 commits into from
Mar 13, 2023
Merged

Conversation

zovelsanj
Copy link
Contributor

@zovelsanj zovelsanj commented Feb 11, 2023

📚 Description

📝 Checklist

  • I have made sure that the title is self-explanatory and the description concisely explains the PR.
  • I have linked an issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

Added sage library installation instructions using pip. Installing sage in a python virtual environment can be troublesome as `sage` and `sagemath` libraries, not at all related to this sage, exist in PiPy.
updated sage installation method with pip
@zovelsanj
Copy link
Contributor Author

Added sage library installation instructions using pip. Installing sage in a python virtual environment can be troublesome as sage and sagemath libraries, not at all related to this sage, exist in PiPy.

README.md Show resolved Hide resolved
README.md Outdated
Alternative Installation using PiPy
---------------

You can find `sage` and `sagemath` pip packages but it is worth nothing that they are not at all realted to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. For installation of this `sage` you need to install `sagemath-standard`. First activate your python virtual environment and follow these steps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is needed to talk about these packages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These packages are very misleading during sage installation in a python virtual environment and the sources on the internet do not explain clearly about the installation of sage package using pip.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least don't start the writing with what shouldn't be done. And nobody needs to know in what specific way these packages are unsuitable. As simple "(Ignore the sage and sagemath packages on PyPI.)" should be enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Thank you

Copy link
Contributor Author

@zovelsanj zovelsanj Feb 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a note would be better to avoid this ambiguity of sage and sagemath in PyPi.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should contact the maintainer of the empty sage package, @dhagrow, and ask if they would mind transferring the name to the SageMath org somehow (unsure if this ping here does anything but it's fairly easy to find an associated email address for that user on google if we did want to get in conact if desired).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's #28796.

Fixed the pip installation instructions according to this [comment](sagemath#35070 (comment)).
README.md Outdated Show resolved Hide resolved
changed `PiPy` to 'PyPi'
README.md Show resolved Hide resolved
changed PyPi tp PyPI
Alternative Installation using PyPI
---------------

For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps:
For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps:

README.md Outdated Show resolved Hide resolved
README.md Outdated

You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`.

**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that they are not at all related to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These packages are actually related to SageMath, but they are not useful.
Please reduce

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After installing sage and sagemath with pip and importing sage it throws an import error: No module named sage.
I don't understand how they are related to sage if they can't import sage at all. Please refer to this post on stackoverflow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's nothing deep to understand here. Both packages were created because the respective authors intended to provide some functionality related to SageMath. But neither of the two packages can be used to install SageMath, so they should be ignored.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will update the readme

README.md Outdated
Alternative Installation using PiPy
---------------

You can find `sage` and `sagemath` pip packages but it is worth nothing that they are not at all realted to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. For installation of this `sage` you need to install `sagemath-standard`. First activate your python virtual environment and follow these steps:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's #28796.

updated the ambiguity note on `sage` and `sagemath` as per [sagemath#35070](sagemath#35070 (comment))
@mkoeppe mkoeppe changed the title updated sage installation method with pip Document sage installation method with pip Feb 12, 2023
README.md Outdated
@@ -407,7 +407,7 @@ For installation of `sage` in python using `pip` you need to install `sagemath-s

You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`.

**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that they are not at all related to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package.
**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that when importing `sage` with these packages you will encounter `ModuleNotFoundError: No module named 'sage'`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still too much information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduced the information.

zovelsanj and others added 3 commits February 15, 2023 11:00
Reduced `sage` and `sagemath` information as per [sagemath#35070](sagemath#35070 (comment))
Co-authored-by: Alex J Best <alex.j.best@gmail.com>
Copy link
Member

@mkoeppe mkoeppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now, thanks!

@github-actions
Copy link

Documentation preview for this PR is ready! 🎉
Built with commit: ee2149d

@codecov-commenter
Copy link

Codecov Report

Base: 88.59% // Head: 88.58% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (ee2149d) compared to base (fbb4127).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35070      +/-   ##
===========================================
- Coverage    88.59%   88.58%   -0.01%     
===========================================
  Files         2140     2140              
  Lines       396961   396961              
===========================================
- Hits        351677   351643      -34     
- Misses       45284    45318      +34     
Impacted Files Coverage Δ
...e/combinat/cluster_algebra_quiver/mutation_type.py 49.88% <0.00%> (-3.09%) ⬇️
src/sage/cpython/_py2_random.py 75.20% <0.00%> (-1.24%) ⬇️
src/sage/modular/hecke/algebra.py 94.65% <0.00%> (-1.07%) ⬇️
src/sage/combinat/posets/poset_examples.py 87.67% <0.00%> (-1.01%) ⬇️
src/sage/sets/integer_range.py 91.41% <0.00%> (-0.51%) ⬇️
src/sage/modular/arithgroup/arithgroup_perm.py 92.57% <0.00%> (-0.38%) ⬇️
src/sage/modular/overconvergent/hecke_series.py 98.76% <0.00%> (-0.31%) ⬇️
src/sage/rings/function_field/ideal.py 89.47% <0.00%> (-0.17%) ⬇️
src/sage/combinat/posets/lattices.py 92.26% <0.00%> (-0.10%) ⬇️
src/sage/graphs/generic_graph.py 89.04% <0.00%> (-0.08%) ⬇️
... and 11 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vbraun vbraun merged commit 6760c40 into sagemath:develop Mar 13, 2023
@mkoeppe mkoeppe added this to the sage-10.0 milestone Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants