---
dir: rtl
---
# Installing Mamba and Sage
## Table of Contents
- [العربية](#العربية)
- [English](#English)
- [Français](#Français)
<a name="العربية"></a>
## العربية
لتثبيت Sage، سنحتاج أولاً إلى إعداد مدير الحزم Mamba. اتبع هذه الخطوات (بعد فتح Linux/WSL):
1. **تنزيل Miniforge:**
استخدم الأمر التالي لتنزيل نص تثبيت Miniforge المناسب لنظامك:
```bash
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
```
2. **تشغيل المثبت:**
قم بتنفيذ النص المنزل لتثبيت Miniforge:
```bash
bash Miniforge3-$(uname)-$(uname -m).sh
```
سيقوم ذلك بإعداد Miniforge، الذي يشمل مدير الحزم Conda.
3. **(اختياري) إزالة بيئة Sage السابقة:**
إذا كنت قد قمت بتثبيت Sage مسبقًا وترغب في البدء من جديد، يمكنك إزالة بيئة Sage الحالية:
```bash
conda remove --name sage --all # إزالة باستخدام Conda
mamba remove --name sage --all # إزالة باستخدام Mamba
```
4. **تسريع التثبيت (اختياري ولكن غير موصى به من أجل الأمان):**
إذا كنت مستعدًا للتضحية بالأمان من أجل تسريع التثبيت، يمكنك تعطيل التحقق من صحة SSL. يرجى ملاحظة أن هذا غير موصى به إلا إذا كنت متأكدًا من مصدر الحزم:
```bash
conda config --set ssl_verify false
```
5. **تثبيت Sage:**
الآن حان الوقت لإنشاء بيئة Conda جديدة بالاسم "sage" وتثبيت Sage بالإضافة إلى Python 3.11 باستخدام Mamba:
```bash
mamba create -n sage sage=10.5
```
يمكنك تحديد الإصدار الذي تريده، فقط تحقق في الصفحة الرسمية للإصدار المتوافق مع احتياجاتك وإصدار Python.
6. **استعادة التحقق من صحة SSL:**
بعد التثبيت، من الضروري استعادة التحقق من صحة SSL للأمان:
```bash
conda config --set ssl_verify true
```
7. **تشغيل Sage:**
الآن بعد تثبيت Sage، يمكنك تنشيط البيئة "sage" وتشغيل SageMath:
```bash
conda activate sage
sage
```
الآن لقد قمت بتثبيت Sage وتشغيله بنجاح!
لمزيد من المعلومات وحل المشكلات، يمكنك الرجوع إلى [التوثيق الرسمي لـ Sage](https://doc.sagemath.org/html/en/installation/conda.html).
<a name="english"></a>
## English
To install Sage, we'll first need to set up the Mamba package manager. Follow these steps (after opening your Linux/WSL):
1. **Download Miniforge:** Use the following command to download the Miniforge installer script appropriate for your system:
```bash
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
```
2. **Run the Installer:**
Execute the downloaded script to install Miniforge:
```bash
bash Miniforge3-$(uname)-$(uname -m).sh
```
This will set up Miniforge, which includes the Conda package manager.
3. **(Optional) Remove Previous Sage Environment:**
If you've previously installed Sage and want to start fresh, you can remove the existing Sage environment:
```bash
conda remove --name sage --all # Remove with Conda
mamba remove --name sage --all # Remove with Mamba
```
4. **Speed Up Installation (Optional but Not Recommended for Security):**
If you're willing to trade off security for faster installation, you can disable SSL verification. Note that this is not recommended unless you're sure about the source of the packages:
```bash
conda config --set ssl_verify false
```
5. **Install Sage:**
Now it's time to create a new Conda environment named "sage" and install Sage along with Python 3.11 using Mamba:
```bash
mamba create -n sage sage=10.3 python=3.11
```
You can specify the version you want, just check in the official page for the compatible one with your needs and the version of Python.
6. **Restore SSL Verification:**
After installation, it's essential to restore SSL verification for security:
```bash
conda config --set ssl_verify true
```
7. **Run Sage:**
Now that you've installed Sage, you can activate the "sage" environment and run SageMath:
```bash
conda activate sage
sage
```
Now you have successfully installed Sage and run it!
For more information and troubleshooting, you can refer to the [official Sage documentation](https://doc.sagemath.org/html/en/installation/conda.html).
<a name="français"></a>
## Français
Pour installer Sage, nous devrons d'abord configurer le gestionnaire de paquets Mamba. Suivez ces étapes (après avoir ouvert votre Linux/WSL) :
1. **Télécharger Miniforge :**
Utilisez la commande suivante pour télécharger le script d'installation de Miniforge approprié pour votre système :
```bash
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
```
2. **Exécuter l'installateur :**
Exécutez le script téléchargé pour installer Miniforge :
```bash
bash Miniforge3-$(uname)-$(uname -m).sh
```
Cela configurera Miniforge, qui inclut le gestionnaire de paquets Conda.
3. **(Optionnel) Supprimer l'environnement Sage précédent :**
Si vous avez précédemment installé Sage et souhaitez recommencer à zéro, vous pouvez supprimer l'environnement Sage existant :
```bash
conda remove --name sage --all # Supprimer avec Conda
mamba remove --name sage --all # Supprimer avec Mamba
```
4. **Accélérer l'installation (optionnel mais non recommandé pour la sécurité) :**
Si vous êtes prêt à sacrifier la sécurité pour une installation plus rapide, vous pouvez désactiver la vérification SSL. Notez que cela n'est pas recommandé à moins d'être sûr de la source des paquets :
```bash
conda config --set ssl_verify false
```
5. **Installer Sage :**
Il est maintenant temps de créer un nouvel environnement Conda nommé "sage" et d'installer Sage avec Python 3.11 en utilisant Mamba :
```bash
mamba create -n sage sage python=3.11
```
Vous pouvez spécifier la version que vous souhaitez, il suffit de vérifier sur la page officielle celle compatible avec vos besoins et la version de Python.
6. **Restaurer la vérification SSL :**
Après l'installation, il est essentiel de restaurer la vérification SSL pour la sécurité :
```bash
conda config --set ssl_verify true
```
7. **Exécuter Sage :**
Maintenant que vous avez installé Sage, vous pouvez activer l'environnement "sage" et exécuter SageMath :
```bash
conda activate sage
sage
```
Vous avez maintenant installé avec succès Sage et l'avez exécuté !
Pour plus d'informations et de dépannage, vous pouvez vous référer à la [documentation officielle de Sage](https://doc.sagemath.org/html/en/installation/conda.html).