Skip to content

When installingc-compiler on Windows, VS 2022 Build Tools init file is not installed #66

@Dr-Irv

Description

@Dr-Irv

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Not sure if this issue goes here or somewhere else.

This is on Windows 11. First you install the latest Visual Studio 2022 Build Tools. No other Visual Studio is installed.

If you create a new environment, and do conda install c-compiler -c conda-forge, the batch file that is installed in \envs\pandas-dev\etc\conda\activate.d is vs2019_compiler_vars.bat which does not work with Microsoft Visual Studio 2022 Build Tools.

Installing c-compiler causes vs2019_win-x64 to be installed. I would have expected vs2022_win-x64 to be installed.

If I first install vs2022_win-x64 , then c-compiler, then remove \envs\pandas-dev\etc\conda\activate.d\vs2019_compiler_vars.bat, then edit vs2022_compiler_vars.bat to use version 14.41, instead of 14.40, I think it will work properly.

Trying to do this for building pandas on Windows.

Installed packages

# Name                    Version                   Build  Channel
bzip2                     1.0.8                h2bbff1b_6
c-compiler                1.7.0                hcfcfb64_1    conda-forge
ca-certificates           2024.7.4             h56e8100_0    conda-forge
expat                     2.6.2                hd77b12b_0
libffi                    3.4.4                hd77b12b_1
openssl                   3.3.1                h2466b09_2    conda-forge
pip                       24.2            py312haa95532_0
python                    3.12.4               h14ffc60_1
setuptools                72.1.0          py312haa95532_0
sqlite                    3.45.3               h2bbff1b_0
tk                        8.6.14               h0416ee5_0
tzdata                    2024a                h04d1e81_0
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.40                h2eaa2aa_0
vc14_runtime              14.40.33810         ha82c5b3_20    conda-forge
vs2015_runtime            14.40.33810         h3bf8584_20    conda-forge
vs2019_win-64             19.29.30139         he1865b1_20    conda-forge
vswhere                   3.1.7                h57928b3_0    conda-forge
wheel                     0.43.0          py312haa95532_0
xz                        5.4.6                h8cc25b3_1
zlib                      1.2.13               h8cc25b3_1

Environment info

active environment : compiler-test
    active env location : C:\Condadirs\envs\compiler-test
            shell level : 1
       user config file : C:\Users\Irv\.condarc
 populated config files : C:\Users\Irv\.condarc
          conda version : 24.7.1
    conda-build version : 24.5.1
         python version : 3.12.3.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=24.7.1=0
                          __cuda=12.2=0
                          __win=0=0
       base environment : C:\Anaconda3  (read only)
      conda av data dir : C:\Anaconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
                          http://conda.anaconda.org/gurobi/win-64
                          http://conda.anaconda.org/gurobi/noarch
          package cache : C:\Condadirs\pkgs
       envs directories : C:\Condadirs\envs
                          C:\Users\Irv\.conda\envs
                          C:\Anaconda3\envs
                          C:\Users\Irv\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/24.7.1 requests/2.32.2 CPython/3.12.3 Windows/11 Windows/10.0.22631 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8 aau/0.4.4 c/. s/. e/.
          administrator : False
             netrc file : None
           offline mode : False

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions