Fix the invalid path of python virtualenv when using glob. #303

wants to merge 1 commit into from

3 participants


When I create a virtualenv, the bin folder is a child folder of a virtualenv.
Therefore, with the additional asterisk, won't be find by python glob.


python_virtualenv_paths is the list of directories where virtualenvs are created, not a list of virtualenvs.

For example when you use virtualenvwrapper it'll create virtualenvs in ~/.virtualenvs directory, and glob pattern is meant to match following scripts.


@wuub wuub closed this Dec 10, 2013

Thanks! I know what's different. I set up virtualenv per app rather than centralize them. That's why it is not work for me.


Maybe we should add an option of setting specific virtualenv per sublime project? What do you think about that?

@wuub wuub reopened this Dec 10, 2013

It sounds great to have a project setting. But, I think it is simplify to add a list for virtualenv folders in user setting.

Take my directory for example, I usually setup virtualenv directly under an app. The tree of directory would look like the following:


Since glob won't find the hidden folder, I point the path to my apps in this way: ~/Source/*/.venv.
This works well for me after I patch the asterisk.

I prefer this kind of solution so that you don't need to configurate virtualenv paths for each projects.


Hey Wojciech!
I'm curious about this thought you proposed back in 2013 about having an option in a sublime project (or possibly sublime workspace?) to specify a virtual environment.

I've been loving SublimeREPL's support for virtual environments when set up with the virtualenv tool, but I've been messing around with python's new native pyvenv command, only to find out that I can't seem to use SublimeREPL with these environments.

I'd be happy to contribute code to help with this. Is this something you would like to see as a part of SublimeREPL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment