Reputation: 530
Im going to use sage module in my Django web application so in my python virtualenv v3.6 I installed sage using pip. when I run my script to use sage I get the following error:
Exception Value: No module named 'sage.all'
I read some posts that sage has its own python. does it mean that I can not use sage in my python virtualenv?
Upvotes: 6
Views: 21241
Reputation: 43
sage or sagemath is not available on PiPy. The packages installed during pip install sage
and pip install sagemath
are unrelated to sage and sagemath. You can install sagemath from apt
:
sudo apt-get install sagemath
but it might not work with python environment like you expected.
However, you can install them with conda-forge
.
conda config --add channels conda-forge
conda install sage
Alternatively, you can install sage using mamba
.
conda install mamba
mamba install sage
For more information please refer to the GitHub repo of sage. I have added the instructions required for sage installation using PyPI.
Upvotes: 2
Reputation: 3453
SageMath can be installed from several package managers, including the standard package managers of several operating systems.
In particular, SageMath is packaged for Arch Linux, Conda, Debian, Fedora, Gentoo, Nix.
For more details see the "Distribution" page on the SageMath wiki.
The Sage library currently cannot be pip-installed. Work on that is tracked at:
Upvotes: 1
Reputation: 94531
pip install sage
installs a version 0.0.0 of a package that doesn't have any code inside, just an empty __init__.py
. It's certainly not that sage
you want to install. You have to find out which sage
you really want. Do you mean SageMath?
Upvotes: 3