# Step 1: Create a Conda environmentconda
create --name myenv python=3.8
# Step 2: Activate the environment
conda activate myenv
# Step 3: Install packages with Conda
conda install numpy scipy pandas
# Step 4: Install remaining packages with Pip (if not available in Conda)
pip install transformers requests
- After we activate the virtual environment, all the packages installed by Conda and pip will be in the virtual environment.
- Packages installed by conda install will be more compatible. So we should use Conda install first.
- Some packages are not provided by conda. Then, we need to use pip, which provides a broader selection for Python-only packages.
- We can check whether the packages installed by pip are in the specific environment or not by the following command.