解决WSL与windows的PATH环境变量冲突问题

admin 2021年1月18日20:42:19评论1,518 views字数 281阅读0分56秒阅读模式
摘要

如果在windows和wsl中都安装了python, 那么由于wsl的互交互特性, pienv的运行就会不太正常

如果在windows和wsl中都安装了python, 那么由于wsl的互交互特性, pienv的运行就会不太正常

以下是禁用互交互的步骤

WSL的终端中输入:

1 
echo "[interop]/nenabled=false/nappendWindowsPath=false" | sudo tee /etc/wsl.conf 

Powershell(以管理员身份运行)中输入: (以重启wsl)

1 2 
net stop LxssManager net start LxssManager 

如果已知distro名, 可用wsl --terminate <distro名>终止特定的wsl distro

效果如下:

解决WSL与windows的PATH环境变量冲突问题

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年1月18日20:42:19
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   解决WSL与windows的PATH环境变量冲突问题https://cn-sec.com/archives/245711.html

发表评论

匿名网友 填写信息