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

Asked 1 weeks ago, Updated 1 weeks ago, 1 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


© 2022 pinfo. All rights reserved.