-
Notifications
You must be signed in to change notification settings - Fork 10
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
Auto activate with profile not work #12
Comments
Did you add the command to your powershell profile as instructed in this section of the readme? |
Note: This only works if you open the shell in the current directory using "Open shell here". |
I followed the Readme file and added the command in the profile. And I also noticed that the "open powershell window here" should be used. But it still does not initialize successfully, unless init is executed manually. Sorry for not describing clearly. Here is a more detailed description. In order to prove that the profile has been executed, and the 'pyenv-venv' command can be executed successfully, I wrote such a profile file. And then, in the target directory, use "open powershell window here" to open a shell window. As you see, the command But the python environment is not loaded successfully. Next, I manually executed the command 'pyenv-venv init', then the python environment was initialized successfully. Even if I add 'sleep 10' at the beginning of the profile file, it still have nothing change. |
Oh, I know the reason. pyenv-win-venv/bin/pyenv-win-venv.ps1 Line 21 in aff05d4
The output of |
Since the definition of the right-click shortcut key is in the registry: Create a profile file for this, and it works.
|
Thanks for all the investigation into this. I will look into this once I am back home. The CLI is initializing the env correctly in my personal laptop but I tried it out in my work pc and it fails to activate. Need to check why its working as intended in my laptop. |
@gruiyuan I pushed an update which adds a Update the CLI using: After that, when you open the shell, it should output the debug log. |
Update regarding this. My work pc didnt have |
Ok. profile is
When I open the shell by 'shift + right-clicking' in the working directory,hear is the debug log. It is consistent with my previous analysis. |
Are you still encountering this issue? I wasn't able to duplicate this in any of my systems. |
In order to get the same experience as pyenv under linux, I used the method mentioned in the note. But it doesn't work.
I confirmed that there is a .python-version file in my directory, and the profile has been executed.
It work when I manually run command 'pyenv-venv init'
The text was updated successfully, but these errors were encountered: