0

Is it possible to set a specific interpreter (Python 3.7 or Python3.8) without using any IDE but only using command line commands?

I know that is possible using Pycharm, Anaconda or other else, but I would know the command.

Thanks and good day

phd
  • 82,685
  • 13
  • 120
  • 165
  • https://stackoverflow.com/a/58432719/7976758: `python3.8 -m venv --upgrade YOUR_VENV_DIRECTORY` – phd Mar 10 '20 at 11:20
  • https://stackoverflow.com/search?q=%5Bvirtualenv%5D+change+python+version – phd Mar 10 '20 at 11:20

1 Answers1

0

If you use conda or mini conda, you can set up separate virtual environment with the benefit of selecting a different interpreter version and different packages. I suggest you familiarise yourself with conda and miniconda, and how to start an environment, run scripts etc from terminal with their guides. Resources below:

https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

ciacicode
  • 708
  • 1
  • 5
  • 13
  • Hi ciacicode, thanks for your answer, i know that with conda, miniconda, pycharm it's possible, I try to understand how do this without these program, but only with python command. – Andrea Pasquini Mar 10 '20 at 13:06
  • Conda and miniconda also have terminal interfaces. To use a python command you first need to have a python interpreter, which is usually set in a folder on your system, with all the relevant libraries. Conda and miniconda set up those folders for you, and then you can start an environment and use python commands right from the terminal. For example after I create an environment with conda create --name myenv, I do conda activate myenv and after that I can do pyhon myfile.py – ciacicode Mar 12 '20 at 08:32