Charles
06/18/2024, 5:01 PMNate
06/18/2024, 5:29 PMdefault pathby default path do you mean the python interpreter that you use?
Charles
06/18/2024, 5:32 PMNate
06/18/2024, 5:37 PMsource
it when I want that one (but im on unix)Charles
06/18/2024, 5:41 PMNate
06/18/2024, 5:45 PMMarvin
06/18/2024, 5:46 PMshell
conda create --name myenv python=3.9
- Replace myenv
with your desired environment name, and 3.9
with the Python version of your choosing.
3. Activate the environment
- Run the following command to activate your environment:
shell
conda activate myenv
4. Install necessary packages
- With the environment activated, install your required packages:
shell
conda install package-name
- Or if you are using `pip`:
shell
pip install package-name
5. Deactivate the environment
- When done, simply deactivate the environment with:
shell
conda deactivate
### Setting Up an Isolated Virtual Environment with venv
If Conda has you feeling like you’re lost in the Vogon constructor fleet, maybe venv
is simpler:
1. Install Python
- Make sure Python is installed. You can download it from python.org.
2. Set up a virtual environment
- Navigate to your project directory and run:
shell
python -m venv myenv
3. Activate the virtual environment
- On Windows, use:
shell
.\myenv\Scripts\activate
- On macOS/Linux, use:
shell
source myenv/bin/activate
4. Install necessary packages
- Once activated, install your packages:
shell
pip install package-name
5. Deactivate the environment
- Run:
shell
deactivate
Isolating your development environment helps to avoid the endless chaos and unexpected bugs that can arise from package conflicts.
If you encounter specific issues or errors during the setup on Conda/Windows, feel free to share details, and I can assist you further.Charles
06/18/2024, 6:15 PMCharles
06/18/2024, 6:15 PMNate
06/18/2024, 6:17 PMCharles
06/18/2024, 6:38 PM