0

我尝试按照这些说明进行操作,但它不适用于使用 PowerShell 的 Windows 10 系统。

我收到此错误:

ERROR: The path to access to python doesn't exist. Python directory = ...

整个 CLI 输出

查找 Python 可执行文件:

PS C:\Users\username\Projects\project> (gcm python).Path
C:\Users\username\.pyenv\pyenv-win\shims\python.bat

尝试制作一个新的虚拟环境:

PS C:\Users\username\Projects\project> mkvirtualenv -Python C:\Users\username\.pyenv\pyenv-win\shims -Name MyNewEnv 

  ERROR: The path to access to python doesn't exist. Python directory = C:\Users\username\.pyenv\pyenv-win\shims

检查提供的 Python 路径的内容以确认其正确性:

PS C:\Users\username\Projects\project> ls C:\Users\username\.pyenv\pyenv-win\shims\


    Directory: C:\Users\username\.pyenv\pyenv-win\shims


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        26.04.2021     16:29             51 easy_install
-a----        26.04.2021     16:29             51 easy_install-3.9
-a----        26.04.2021     16:29             66 easy_install-3.9.bat
-a----        26.04.2021     16:29             66 easy_install.bat
-a----        26.04.2021     16:29             51 pip
-a----        26.04.2021     16:29             66 pip.bat
-a----        26.04.2021     16:29             51 pip3
-a----        26.04.2021     16:29             51 pip3.9
-a----        26.04.2021     16:29             66 pip3.9.bat
-a----        26.04.2021     16:29             66 pip3.bat
-a----        26.04.2021     16:29             43 python
-a----        26.04.2021     16:29             58 python.bat
-a----        26.04.2021     16:29             43 python3
-a----        26.04.2021     16:29             43 python3.9
-a----        26.04.2021     16:29             58 python3.9.bat
-a----        26.04.2021     16:29             58 python3.bat
-a----        26.04.2021     16:29             43 python39
-a----        26.04.2021     16:29             58 python39.bat
-a----        26.04.2021     16:29             43 pythonw
-a----        26.04.2021     16:29             58 pythonw.bat
-a----        26.04.2021     16:29             43 pythonw3
-a----        26.04.2021     16:29             43 pythonw3.9
-a----        26.04.2021     16:29             58 pythonw3.9.bat
-a----        26.04.2021     16:29             58 pythonw3.bat
-a----        26.04.2021     16:29             43 pythonw39
-a----        26.04.2021     16:29             58 pythonw39.bat
4

0 回答 0