Can I use a different version of a library like Python?

Asked 2 years ago, Updated 2 years ago, 90 views

I'm using Transformers for Python It's compatible with the old version of the library In one Python, I want to use both versions of 3.01 and 4.10 together, is there a way?

python library

2022-09-20 15:09

1 Answers

That's why you have to use a virtual environment.

For Vanilla Python, create a virtual environment with venv or virtualenv, activate the created virtual environment, and install and run the library in that virtual environment.

Create and activate another virtual environment and install and run a different version of the library in that virtual environment.

If you use Python in an Anaconda environment, you can create a virtual environment with the conda create command instead of venv.


2022-09-20 15:09

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.