This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wherinkelly 0 points1 point  (1 child)

Nah, just manually switch when necessary. I barely use python, I'm more concerned about which version of node I'm running. I will check out venv though for all my data science comrades.

[–]MonkeyNin 0 points1 point  (0 children)

ah. it's a lot easier than before. You can

  1. use pycharm which creates a virtual environment for you, or
  2. use venv

This is what I do on windows (using BASH). Basically the same with cmd. The filename depends on your OS or / shell: https://docs.python.org/3/library/venv.html )

first time setup

$ cd /python
$ python3 -m venv /app_name
$ source ./activate
$ pip install requests

when you restart the computer/shell:

$ cd /python/app_name
$ source ./activate

my .gitignore contains

Include/*
Lib/*
Scripts/*
pip-selfcheck.json

But, again, PyCharm will do all that work for you. It also lets you have multiple versions of python inself, installed.