Skip to content

Python interpreter path detection doesn't work well on non-unix environment #84

@merlynmg

Description

@merlynmg

I'm on Windows 10. The detection of fall through/error detection mechanism doesn't work well. Falling through on empty is fine, but IMO it should also fall through on error.

In my case, here's my settings:

  • From SublimePythonIDE settings: None - falls through
  • From venv settings: None - falls through
  • From #! (shebang) line in this file: ['/usr/bin/env', 'python'] - this is the problem
  • From system Python (via $PATH): ['C:\\Python27\\python.exe'] - this value would work, if it was used

There are some work around options, but they seem less than optimal.

If I set C:\\Python27\\python.exe in the project config, everything is okay. However this is, as far as I'm concerned, a system setting for me, and not a project setting.

I have virtual environments set up, using a user-level ~/.virtualenvs directory rather than one under my project's path, though as you can see it is not detecting it. Not sure how to get SublimePythonIDE to find that, or if the path differences would pan out (C:\\Python27\python.exe vs /c/Python27/python.exe).

Edit: I figured out why it isn't detecting my venv. I'm nesting multiple projects under the same source control, with different virtual environments for each, and the venv detection is project folder name based. I can't figure out a reasonable way this could be implemented to work, yet still keep my sublime text project at the root directory. I am guessing a most other projects probably won't have this problem.

Fortunately I have a patch that might make any workarounds unnecessary, and also won't require me to get venv detection working for this project :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions