0

I had some permission issues to install specific python versions by the command pyenv install 3.9.12 on a x64 Windows 10. Alternatively, I'm trying to install python from python package's zip file, but got error message below.

.pyenv\pyenv-win\libexec\pyenv-install.vbs(0, 1) Microsoft VBScript runtime error: Object doesn't support this property or method: 'version.getElementsByTagName'

Did I misconfig in the .versions_cache.xml file or anything else I need to look into ?

References from pyenv-win

$ pyenv --version
pyenv 2.64.11

$ pyenv install 3.9.12
:: [Info] ::  Mirror: https://www.python.org/ftp/python
D:\writable\.pyenv\pyenv-win\libexec\pyenv-install.vbs(0, 1) Microsoft VBScript runtime error: Object doesn't support this property or method: 'version.getElementsByTagName'

with modified .versions_cache.xml

<versions>
    <version x64="true" webInstall="false" msi="false">
        <code>3.9.12</code>
        <file>python-3.9.12-embed-amd64.zip</file>
        <URL>https://www.python.org/ftp/python/3.9.12/python-3.9.12-embed-amd64.zip</URL>
        <zipRootDir>D:\writable\.pyenv\pyenv-win\cache</zipRootDir>
    </version>
</versions>

Compares to normal/default process to download and execute the python installer from https://www.python.org/ftp/python

$ pyenv --version
pyenv 2.64.11

$ pyenv install 3.9.12
:: [Info] ::  Mirror: https://www.python.org/ftp/python
:: [Downloading] ::  3.9.12 ...
:: [Downloading] ::  From https://www.python.org/ftp/python/3.9.12/python-3.9.12-amd64.exe
:: [Downloading] ::  To   D:\writable\.pyenv\pyenv-win\install_cache\python-3.9.12-amd64.exe
:: [Installing] ::  3.9.12 ...
:: [Info] :: completed! 3.9.12

With its default .versions_cache.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<versions>
    <version x64="true" webInstall="false" msi="false">
        <code>3.9.12</code>
        <file>python-3.9.12-amd64.exe</file>
        <URL>https://www.python.org/ftp/python/3.9.12/python-3.9.12-amd64.exe</URL>
    </version>
</versions>

The later one works fine if you don't have permission issues on your Windows 10 machine. While, looking for zip way workaround, thanks.

nwpie
  • 665
  • 11
  • 24

0 Answers0