Skip to content

Pyenv not being added to PATH in WSL if Pyenv-Win is on PATH #2026

@bbulkow

Description

@bbulkow

pyenv mysteriously not working on WSL after Win11 upgrade

I've been using Pyenv happily with WSL and WIN11 forever. Feels like forever. Years. I prefer WSL1 because it is 10x faster for what I use (long story), and I'm still on Ubuntu 18.04 for my WLS1 shell.

I install via the basic "pull and bash" mechanism. I do a clone of the git repo into the usual location in the home directory, execute the path elements to point there, then pyenv init, in my .bash_alises , which has always worked before.

Right around when I upgraded to Windows 11 - probably two weeks ago, when Win11 came through the beta channel (not alpha), I noticed my python version was python2 instead of python3.

Digging in, I see that pyenv is installed properly, still, but when I 'which python' I get '/usr/bin/python', even though I have exec'd the init so the shims should be installed. Either the shims are not getting installed or they are getting removed or overridden?

I've checked every obvious thing I can find, and it just seems like the shims don't install. I've also tried going to a fresh WSL2 install on U20.04. I've looked at the path --- virtualenv was in front, and I removed that.

If I had to guess, I would assume there's some dependancy on the uname, which probably changed. The current one is:
Linux SUPERFLY 4.4.0-22000-Microsoft #1-Microsoft Fri Jun 04 16:28:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux

I've looked through the various scripts that should install the shims and just don't see anything.

Halp? Next places to look?

Description

  • WSL1 Ubuntu 18.04 on Windows 11 preview (beta channel, not alpha)
  • OS Architecture - AMD64
  • Pyenv version: 2.0.4-5-gab1a9d29
  • Python version: all
  • GCC 10 (Ubuntu 10.3.0-1ubuntu118.041)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions