pythonvirtualenvsublimetext3sublime-text-pluginsublimerepl

How do I use Virtual Environments with SublimeREPL?


I am a beginner to coding in general and I just found out that we could create virtual environments and was soon disappointed to see that there was no tutorial or answer anywhere for a Windows user and the only one I found was THIS. Which kinda solves my problem but isn't ideal. And I wanted to follow forms that actually SOLVED my problem but they were for mac and linux users. So can someone help me out?

Thanks in advance !!!


Solution

  • It is mentioned in the docs:

    For virtualenv created environments to be discoverable by SublimeREPL they should be created or symlinked in one of the following:

    Alternatively, more paths can be added to “python_virtualenv_paths” in the SublimeREPL configuration file.

    If your virtualenvs are created in another directory add them to SublimeREPL.sublime-settings. For me, they are in ~/Envs:

    {
        "python_virtualenv_paths": ["C:\\Users\\my_username\\Envs"]
    }
    

    Assuming you're using the correct path, sublimeREPL: Python - virtualenv allows you to select the venv you want to work with: