Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

virtualenv - How to set up specific python version for virtual environment for python?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can do

virtualenv -p python3.7.5 [name]

but you need to have python3.7.5 in your $PATH or you will get

RuntimeError: failed to find interpreter for Builtin discover of python_spec='python3.7.5'

So, you would better use conda

conda create --name [name] python=3.7.5

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...