Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running conda init powershell gives the following error: "ValueError: No python version information available." #695

Open
1 task done
nulltone opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working windows

Comments

@nulltone
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Hi. I was referred to here by the Conda team (see my post in there: conda/conda#14438).

I've used the following steps a bunch of times on several machines without issues. This is the first time I've encountered an issue with conda. I've installed miniforge3 via chocolatey by running the following command:

choco install miniforge3 --params="'/InstallationType:AllUsers /AddToPath:1'" --yes

It installs miniforge3 without issues as shown below:

PS C:\Windows\System32> choco install miniforge3 --params="'/InstallationType:AllUsers /AddToPath:1'" --yes --force
Chocolatey v2.4.1
Installing the following packages:
miniforge3
By installing, you accept licenses for the packages.
miniforge3 v24.9.2 already installed. Forcing reinstall of version '24.9.2'.
 Please use upgrade if you meant to upgrade to a new version.
Downloading package from source 'https://community.chocolatey.org/api/v2/'
Progress: Downloading miniforge3 24.9.2... 100%

miniforge3 v24.9.2 (forced) [Approved]
miniforge3 package files install completed. Performing other installation steps.
miniforge3 will be installed for all users.
miniforge3 python will be registered as the system's default.
miniforge3 directories will be added to path.
miniforge3 will be installed to 'C:\tools\miniforge3'.

Installing 64-bit miniforge3...
miniforge3 has been installed.
 The install of miniforge3 was successful.
  Deployed to 'C:\tools\miniforge3'

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\Windows\System32>

Then I ran the init function to get it set up on my PowerShell terminal, but then it threw an error:

PS C:\Windows\System32> conda init powershell

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\tools\miniforge3\Lib\site-packages\conda\exception_handler.py", line 18, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\cli\main.py", line 61, in main_subshell
        exit_code = do_call(args, parser)
                    ^^^^^^^^^^^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\cli\conda_argparse.py", line 205, in do_call
        result = getattr(module, func_name)(args, parser)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\cli\main_init.py", line 162, in execute
        return initialize(
               ^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\core\initialize.py", line 134, in initialize
        plan2 = make_initialize_plan(
                ^^^^^^^^^^^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\core\initialize.py", line 561, in make_initialize_plan
        plan = make_install_plan(conda_prefix)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\core\initialize.py", line 295, in make_install_plan
        python_exe, python_version, site_packages_dir = _get_python_info(conda_prefix)
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\tools\miniforge3\Lib\site-packages\conda\core\initialize.py", line 1929, in _get_python_info
        raise ValueError("No python version information available.")
    ValueError: No python version information available.

`$ C:\tools\miniforge3\Scripts\conda-script.py init powershell`

  environment variables:
                 CIO_TEST=<not set>
                CONDA_EXE=C:\tools\miniforge3\condabin\..\Scripts\conda.exe
               CONDA_EXES="C:\tools\miniforge3\condabin\..\Scripts\conda.exe"
               CONDA_ROOT=C:\tools\miniforge3
           CURL_CA_BUNDLE=<not set>
                 HOMEPATH=\Users\MNoriega
               LD_PRELOAD=<not set>
                     PATH=C:\Program Files\Thycotic\Agents\ApplicationControl\x64;C:\Program
                          Files\Thycotic\Agents\ApplicationControl\x64;C:\Program
                          Files\PowerShell\7;C:\Program Files\Thycotic\Agents\ApplicationControl
                          \x64;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\window
                          s\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Pro
                          gram Files\PowerShell\7\;C:\Program Files\Microsoft VS
                          Code\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\too
                          ls\miniforge3\condabin;C:\Python311\;C:\Python311\Scripts\;C:\Users\MN
                          oriega\AppData\Local\Microsoft\WindowsApps;
             PSMODULEPATH=C:\Users\MNoriega\Documents\PowerShell\Modules;C:\Program
                          Files\PowerShell\Modules;c:\program
                          files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;
                          C:\windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program
                          Files\Thycotic\Powershell\
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : None
       user config file : C:\Users\MNoriega\.condarc
 populated config files : C:\tools\miniforge3\.condarc
          conda version : 24.9.2
    conda-build version : not installed
         python version : 3.12.7.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.9.2=0
                          __cuda=12.4=0
                          __win=0=0
       base environment : C:\tools\miniforge3  (writable)
      conda av data dir : C:\tools\miniforge3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\tools\miniforge3\pkgs
                          C:\Users\MNoriega\.conda\pkgs
                          C:\Users\MNoriega\AppData\Local\conda\conda\pkgs
       envs directories : C:\tools\miniforge3\envs
                          C:\Users\MNoriega\.conda\envs
                          C:\Users\MNoriega\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.9.2 requests/2.32.3 CPython/3.12.7 Windows/11 Windows/10.0.22631 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.9
          administrator : True
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: y
Upload did not complete.

Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running

    $ conda config --set report_errors true

PS C:\Windows\System32>

It says it cannot find the python version information. I do have Python 3.11 installed as shown below:

PS C:\Windows\System32> python --version
Python 3.11.9

What can I do to get this issue resolved?

Installed packages

PS C:\tools> conda list
# packages in environment at C:\tools\miniforge3:
#
# Name                    Version                   Build  Channel
archspec                  0.2.3              pyhd8ed1ab_0    conda-forge
boltons                   24.0.0             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py312h275cf98_2    conda-forge
bzip2                     1.0.8                h2466b09_7    conda-forge
ca-certificates           2024.8.30            h56e8100_0    conda-forge
certifi                   2024.8.30          pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py312h4389bb4_0    conda-forge
charset-normalizer        3.4.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     24.9.2          py312h2e8e312_0    conda-forge
conda-libmamba-solver     24.9.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.4.0              pyh7900ff3_0    conda-forge
conda-package-streaming   0.11.0             pyhd8ed1ab_0    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
fmt                       10.2.1               h181d51b_0    conda-forge
frozendict                2.4.6           py312h4389bb4_0    conda-forge
h2                        4.1.0              pyhd8ed1ab_0    conda-forge
hpack                     4.0.0              pyh9f0ad1d_0    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_0    conda-forge
idna                      3.10               pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               3.0.0           py312h2e8e312_1    conda-forge
krb5                      1.21.3               hdf4eb48_0    conda-forge
libarchive                3.7.4                haf234dc_0    conda-forge
libcurl                   8.10.1               h1ee3ff0_0    conda-forge
libexpat                  2.6.4                he0c23c2_0    conda-forge
libffi                    3.4.2                h8ffe710_5    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
libmamba                  1.5.9                hdee400e_0    conda-forge
libmambapy                1.5.9           py312h0723cf6_0    conda-forge
libsolv                   0.7.30               hbb528cf_0    conda-forge
libsqlite                 3.47.0               h2466b09_1    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libxml2                   2.13.4               h442d1da_2    conda-forge
libzlib                   1.3.1                h2466b09_2    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              hcfcfb64_1001    conda-forge
mamba                     1.5.9           py312h5494d5c_0    conda-forge
menuinst                  2.2.0           py312h275cf98_0    conda-forge
miniforge_console_shortcut 1.0                  h57928b3_0    conda-forge
openssl                   3.3.2                h2466b09_0    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pip                       24.3.1             pyh8b19718_0    conda-forge
platformdirs              4.3.6              pyhd8ed1ab_0    conda-forge
pluggy                    1.5.0              pyhd8ed1ab_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py312he70551f_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyh0701188_6    conda-forge
python                    3.12.7          hce54a09_0_cpython    conda-forge
python_abi                3.12                    5_cp312    conda-forge
reproc                    14.2.4.post0         hcfcfb64_1    conda-forge
reproc-cpp                14.2.4.post0         h63175ca_1    conda-forge
requests                  2.32.3             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.18.6          py312h4389bb4_1    conda-forge
ruamel.yaml.clib          0.2.8           py312h4389bb4_1    conda-forge
setuptools                75.3.0             pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
tqdm                      4.67.0             pyhd8ed1ab_0    conda-forge
truststore                0.10.0             pyhd8ed1ab_0    conda-forge
tzdata                    2024b                hc8b5060_0    conda-forge
ucrt                      10.0.22621.0         h57928b3_1    conda-forge
urllib3                   2.2.3              pyhd8ed1ab_0    conda-forge
vc                        14.3                h8a93ad2_22    conda-forge
vc14_runtime              14.40.33810         hcc2c482_22    conda-forge
vs2015_runtime            14.40.33810         h3bf8584_22    conda-forge
wheel                     0.45.0             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0              pyh7428d3b_7    conda-forge
xz                        5.2.6                h8d14728_0    conda-forge
yaml-cpp                  0.8.0                h63175ca_0    conda-forge
zstandard                 0.23.0          py312h7606c53_1    conda-forge
zstd

Environment info

PS C:\tools> conda info

     active environment : None
       user config file : C:\Users\MNoriega\.condarc
 populated config files : C:\tools\miniforge3\.condarc
          conda version : 24.9.2
    conda-build version : not installed
         python version : 3.12.7.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.9.2=0
                          __cuda=12.4=0
                          __win=0=0
       base environment : C:\tools\miniforge3  (writable)
      conda av data dir : C:\tools\miniforge3\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\tools\miniforge3\pkgs
                          C:\Users\MNoriega\.conda\pkgs
                          C:\Users\MNoriega\AppData\Local\conda\conda\pkgs
       envs directories : C:\tools\miniforge3\envs
                          C:\Users\MNoriega\.conda\envs
                          C:\Users\MNoriega\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.9.2 requests/2.32.3 CPython/3.12.7 Windows/11 Windows/10.0.22631 solver/libmamba conda-libmamba-solver/24.9.0 libmambapy/1.5.9
          administrator : True
             netrc file : None
           offline mode : False
@nulltone nulltone added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Development

No branches or pull requests

2 participants