Python3.8 venv returned exit status 101

后端 未结 3 881
别那么骄傲
别那么骄傲 2021-01-21 17:16

I found similar posts, mostly related to linux on venv having an issue with working. python 3.8 venv missing activate command However, I am confused on how to solve it on window

相关标签:
3条回答
  • 2021-01-21 17:46

    I had the same problem (with both Python 3.7 and 3.8), I believe it was due to a Windows update when I enrolled in the Windows Insiders program, but that could have just been a coincidence.

    PS C:\Users\Your Name\AppData\Local\Programs\Python\Python38> ./python -m venv c:\TEMP\py38-venv
    Error: Command '['c:\\TEMP\\py38-venv\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 101.
    

    This worked around the problem in my case:

    • Uninstall Python.
    • Install with the Custom option.
    • Use the "Install for all users".

    After this it worked fine:

    PS C:\Utilities\PythonBase\Python38> .\python -m venv c:\temp\venv-py38
    PS C:\Utilities\PythonBase\Python38>
    

    Of course you'll have to go through and fix any venvs you've been using, but if you're in the same situation as me they won't have been working anyway.

    0 讨论(0)
  • 2021-01-21 17:46

    I unistall all newest version and reinstall python 3.7.9 checking "install for all users" option on instalation, try again to create a project.

    0 讨论(0)
  • 2021-01-21 18:01

    Thanks. I faced the same issue and this thread worked around for me. I uninstalled Python and installed 3.9. Python version (which was available for me at the time) checking "Install for all users" in advanced installing. Remember to check "Add the PATH" box so that you can run Python from the command prompt.

    0 讨论(0)
提交回复
热议问题