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

Doesn't seem to work with environments created with python -m venv #191

Open
gramster opened this issue Aug 14, 2023 · 2 comments
Open

Doesn't seem to work with environments created with python -m venv #191

gramster opened this issue Aug 14, 2023 · 2 comments

Comments

@gramster
Copy link

gramster commented Aug 14, 2023

Issue Details

Please provide the following details when opening an issue:

Operating System (uname -a)

Darwin MacBook-Pro.local 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000 arm64

zsh version (zsh --version)

zsh 5.9 (x86_64-apple-darwin22.0)

autoswitch-virtualenv version

echo "$AUTOSWITCH_VERSION"
<your version here>

3.6.0

How is zsh-autoswitch-virtualenv installed?

  • oh-my-zsh

Steps to reproduce the issue

In a fresh directory foo:

python -m venv .venv
cd ..
cd foo

I would expect the environment to be activated.

If I use mkvenv it works.

gist link to your zshrc

@MichaelAquilina
Copy link
Owner

@gramster you're actually right in that .venv folders are currently not supported. It actually be a relatively easy change to introduce if you want to give it a go :) otherwise I'll try find some time to do it when I am less busy with in real life stuff

@afeblot
Copy link
Contributor

afeblot commented Sep 26, 2024

@gramster, @MichaelAquilina,
Not sure why you would say this is not supported, unless I don't get the question, but it seems to me this is exactly what I implemented here: #168, this was already part of 3.6.0, and it works for me:

$ mkdir foo
$ cd foo
$ python3 -m venv .venv
$ cd ..
$ cd foo
Switching virtualenv: .venv [Python 3.11.6]
$

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