Setup specific python version in virtualenv; setup virtualenv for PyCharm

By | September 14, 2020
Share the joy
  1. Download the python version you want, and install.
  2. In cmd, type python3.8
  3. Find the python3.8 Library path.
  4. Create python3.8 virtualenv
    virtualenv -p /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 venv
  5. venv2
  6. Activate venv
    source venv/bin/activate
  7. Check python version
    python --version


  8. In PyCharm, select the created virtual env
  9. In not existed in Project Interpreter, then click “Show All”, click ‘+’ to add a new one. Select the virtualenv that was just created.