0

When I run python -m venv \pathtomyvenv

Error: Command '['C:\\Users\\user\\manageSQL\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

A similar post cites a Windows update as the culprit. Fix by installing launcher for all users

Here is what the venv looks like after exit:

Include

Lib
    site-packages
Scripts
    python.exe
    pythonw.exe
pyvenv.cfg
    home = C:\Users\myusername\AppData\Local\Programs\Python\Python310
    include-system-site-packages = false
    version = 3.10.4

I cannot install python with admin privilege's in my environment. Is there another fix for this?

Isaacnfairplay
  • 217
  • 2
  • 18
  • download python in your system in a seperate folder, and use that python to run the programs, not system one – sahasrara62 Jul 07 '22 at 21:17
  • I tried using a copy of python.exe copied to the desktop and got the same issue. Is that what you meant? (DesktopPath\python.exe) -m venv test4. As a side question, is this an issue with pip? – Isaacnfairplay Jul 08 '22 at 14:23
  • nope, priviliages to change things in AppData folder – sahasrara62 Jul 08 '22 at 14:31

1 Answers1

0

I manually deleted all the python on my system that my privileges would allow. I could not delete the Python folder in:

C:\Users\username\AppData\Local\Programs\Python but did delete another python installation outside of AppData.

The removed python folder was in: C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

I can now create the venv and resolved an issue with importing a key library (dask).

I believe the duplicate python installation was confusing the launcher but I cannot be sure.

Isaacnfairplay
  • 217
  • 2
  • 18