Search code examples
windowscmdpython-3.7permission-deniedpyenv

Cannot Uninstall Pyenv Python version, Get Error (70) uninstalling version 3.7.3: Permission denied


  • I am trying to uninstall this python version 3.7.3 that i installed using pyenv on Windows 10 :

pyenv versions

* 3.7.3 (set by C:\Users\Esc\.pyenv\pyenv-win\version)
  • Typing
pyenv uninstall 3.7.3 

in cmd with Admin access gives this error:

pyenv: Error (70) uninstalling version 3.7.3: Permission denied

  • Deleting the pyenv folder using
rmdir /s /q  C:\Users\Esc\.pyenv

gives this error log:

C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\libcrypto-1_1-x64.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\libssl-1_1-x64.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\pyexpat.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\select.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\sqlite3.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\unicodedata.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_asyncio.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_bz2.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_ctypes.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_decimal.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_hashlib.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_lzma.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_overlapped.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_queue.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_socket.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_sqlite3.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\DLLs\_ssl.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\debugpy\_VENDO~1\pydevd\_PYDEV~3\pydevd_cython.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\psutil\_psutil_windows.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYWIN3~1\pythoncom37.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYWIN3~1\pywintypes37.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYZMQ~1.LIB\concrt140.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYZMQ~1.LIB\libsodium-138090d4.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYZMQ~1.LIB\libzmq-v142-mt-4_3_4-4e355e3e.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYZMQ~1.LIB\msvcp140.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\PYZMQ~1.LIB\vcruntime140_1.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\tornado\speedups.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\win32\win32api.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\win32\win32security.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\win32\_win32sysloader.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\context.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\error.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\message.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\socket.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\utils.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\_device.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\_poll.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\_proxy_steerable.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\Lib\SITE-P~1\zmq\backend\cython\_version.cp37-win_amd64.pyd - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\python3.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\python3.exe - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\python37.dll - Access is denied.
C:\Users\U\.pyenv\PYENV-~2\versions\3751C5~1.3\vcruntime140.dll - Access is denied.

This pyenv error Error (70) is not found anywhere on the web. Why am i getting it even when i'm the admin.

Permision denied has a solution here but it doesn't work for me.


Solution

  • Try these fixes

    1. Restart Windows Explorer
    2. Try Disk Cleanup, Disabling Thumbnails, Disabling Preview Pane
    3. Go to Task Manager > Kill All Python Processess
    4. Empty your Recycle Bin

    Let me know if this works.