Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual environement? #13

Open
grischard opened this issue Jul 23, 2020 · 6 comments
Open

Virtual environement? #13

grischard opened this issue Jul 23, 2020 · 6 comments

Comments

@grischard
Copy link

Has anyone managed to use this with a python venv?

@foxsam21
Copy link

foxsam21 commented Sep 2, 2020

I am also looking for this. The issue I have is that I cannot flash from vcs because esphome is not found. I imagine that there should be a way to activate the venv for this plugin. Besides for that issue it seems everything works fine.

@glmnet
Copy link
Member

glmnet commented Sep 4, 2020

Not that I tried but what if you start code from the venv?

Just in case make sure you close all code instances.

Then from the venv enter code .

@foxsam21
Copy link

foxsam21 commented Sep 4, 2020

:) Thanks. That worked. I was thinking of much more complicated ways to do it... This was simple and to the point.

@glmnet
Copy link
Member

glmnet commented Sep 8, 2020

Did this work for you too @grischard? can we close this then?

@grischard
Copy link
Author

Yes, that works for me, but would fit nicely in the documentation :)

@foxsam21
Copy link

Looking in the task provider files in my extension I found that I can add the path to esphome and then it works without having to start it from within the venv.
}, 'esphome compile', 'ESPHome', new vscode.ShellExecution('<path to venv>/bin/esphome ${relativeFile} run --upload-port OTA'));
this was in .vscode/extensions/esphome.esphome-vscode-0.3.0/out/EsphomeTaskProvider.js line 7 for me.

Maybe it would be possible to add a way to configure this in a configuration file so someone can have an alternate esphome binary.
I didn't try this but adding esphome to the system path should also work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants