nixpkgs-python icon indicating copy to clipboard operation
nixpkgs-python copied to clipboard

cannot use python3.6 in buildInputs

Open permahorse opened this issue 2 years ago • 3 comments

you can test on simple

mkShell {
    buildInputs = [ nixpkgs-python.packages.x86_64-linux."3.6" ];
};

then with nix develop - python will not start. looks like the problem has something to do with this change since 3.8

permahorse avatar Jul 16 '23 14:07 permahorse

What error do you get?

domenkozar avatar Jul 16 '23 16:07 domenkozar

sorry that i haven't posted the error message - thought it's easier to reproduce and see, but here it is:

Failed to import the site module
Traceback (most recent call last):
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/site.py", line 553, in <module>
    main()
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/site.py", line 539, in main
    known_paths = addusersitepackages(known_paths)
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/site.py", line 282, in addusersitepackages
    user_site = getusersitepackages()
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/site.py", line 258, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/site.py", line 248, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/sysconfig.py", line 601, in get_config_var
    return get_config_vars().get(name)
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/sysconfig.py", line 550, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/nix/store/3ydi8l8whzrvfbmr29aiyiahb9d2kqgs-python3-3.6.15/lib/python3.6/sysconfig.py", line 421, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'

as you see, there is m missing in '_sysconfigdata__linux_x86_64-linux-gnu' and that has something to do with this i bet

permahorse avatar Jul 16 '23 16:07 permahorse

Someone should try to apply https://github.com/pypa/distutils/pull/111/files and see if it fixes it.

domenkozar avatar Oct 03 '23 14:10 domenkozar