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

QGIS doesnt run from NIX on Ubuntu #22176

Closed
RobBlackwell opened this issue Jan 26, 2017 · 4 comments
Closed

QGIS doesnt run from NIX on Ubuntu #22176

RobBlackwell opened this issue Jan 26, 2017 · 4 comments

Comments

@RobBlackwell
Copy link

Issue description

I installed Ubuntu 16.04 today as well as NIX. Other packages work
fine, but he NIX installed QGIS fails as follows:

Steps to reproduce

Fresh install of Ubuntu 16.04 and NIX. Install the QGIS package and run it.

Technical details

Warning: loading of qgis translation failed [/nix/store/gfg4gxc29jjy3zgjwbal2fwq045rrrai-qgis-2.18.3/share/qgis/i18n//qgis_en_GB]
Warning: loading of qt translation failed [/nix/store/fx63mg6wsm40zbcs49mlydsxwfhbk9hh-qt-4.8.7/share/qt-4.8.7/translations/qt_en_GB]
Warning: QCss::Parser - Failed to load file  "/style.qss" 
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
Warning: QFileSystemWatcher: failed to add paths: /home/reb/.qgis2//project_templates
Warning: QLayout: Attempting to add QLayout "" to QgsPanelWidgetStack "mWidgetStack", which already has a layout
Traceback (most recent call last):
  File "/nix/store/rbxjyvqs27i41mzb8paj86saiq4ngzxi-python2.7-setuptools-30.2.0/lib/python2.7/site-packages/site.py", line 73, in <module>
    __boot()
  File "/nix/store/rbxjyvqs27i41mzb8paj86saiq4ngzxi-python2.7-setuptools-30.2.0/lib/python2.7/site-packages/site.py", line 34, in __boot
    imp.load_module('site', stream, path, descr)
  File "/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 237, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 582, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 528, in get_config_vars
   _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 412, in _init_posix
    from _sysconfigdata import build_time_vars
  File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>
   from _sysconfigdata_nd import *
ImportError: No module named _sysconfigdata_nd
  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)

    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 16.04.1 LTS
    Release: 16.04
    Codename: xenial

  • Nix version: (run nix-env --version)

    $ nix-env --version
    nix-env (Nix) 1.11.6

  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

    $ nix-instantiate --eval '' -A lib.nixpkgsVersion
    "17.03pre99424.92b1e39"

@copumpkin
Copy link
Member

Looks like it's depending impurely on your system python! 😱

@FRidh
Copy link
Member

FRidh commented Jan 27, 2017

qgis explicitly asks for the users' site-packages, I guess because it is a feature to install modules as a user. This is something that can always break because we can never guarantee that the users' Python is compatible with ours nor that the users' Python actually works :)

The reason it eventually breaks is because it seems Ubuntu doesn't provide _sysconfigdata_nd where Python looks for it. Note that we actually also don't provide _sysconfigdata_nd (and I have no idea why not).

Furthermore, I saw we still use prefix PYTHONPATH in this expression...

@RobBlackwell
Copy link
Author

RobBlackwell commented Jan 27, 2017

Thanks - installing the Nix supplied Python2Full package solves the problem.

@FRidh
Copy link
Member

FRidh commented Jan 27, 2017

installing the Nix supplied Python2Full package solves the problem.

Good to hear the problem is solved. I am surprised that it did solved it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants