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

Support python venv? #11425

Open
ghost opened this issue Oct 12, 2018 · 7 comments
Open

Support python venv? #11425

ghost opened this issue Oct 12, 2018 · 7 comments
Labels
- Forum - Python stale marked as a stale issue/pr (usually by a bot)

Comments

@ghost
Copy link

ghost commented Oct 12, 2018

Python3 venv
https://docs.python.org/3.6/library/venv.html

Is this support spacemacs python layer?
Looks like isn't support venv.
Is this support only Virtualenvwrapper and pyenv?

@mattnedrich
Copy link

Any update on this?

@github-actions
Copy link

github-actions bot commented Mar 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Mar 2, 2020
@syntacticNaCl
Copy link

Bump

@duianto duianto removed the stale marked as a stale issue/pr (usually by a bot) label Apr 6, 2020
@JCZuurmond
Copy link

JCZuurmond commented Feb 13, 2021

Anyone who has any pointers for this? I am moving to spacemacs and prefer to have my python venv within my project over the globally accessible projects via conda.

For anyone also figuring this out: you can activate a local venv with pyvenv-activate (space m v a or , v a) and then you point to the venv directory. You can check that you are using the expected python by starting a python with python-start-or-switch-repl (, '). Then check the executable path with:

import sys
print(sys.executable)

I was confused at first since the warnings in my python script stayed when doing pyvenv-activate (it was using my global python 2 where I expected to use the local python 3). These warnings are created by the language server, they get resolved after restarting the server , b r (after you activated the right pyenv).

@Hneuschmidt
Copy link

@JCZuurmond as I understand you are explaining how it works when using a venv created by pyenv?
Because it does not work with python -m venv as far as I can see?
Therefore I am also interested to know if support for this is planned at all

@JCZuurmond
Copy link

JCZuurmond commented Feb 17, 2021

It works with python -m venv too. I made a typo in the comment above, , v a maps to pyVenv-activate. You can use that and then select the venv folder you created: python -m venv venv/

btw the docs say that if you name your venv .venv/ then emacs should pick that up automagically, I have not tested that yet.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Forum - Python stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

6 participants