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

gdal: fix standalone python programs #9423

Merged
merged 1 commit into from
Sep 10, 2015
Merged

gdal: fix standalone python programs #9423

merged 1 commit into from
Sep 10, 2015

Conversation

vbgl
Copy link
Contributor

@vbgl vbgl commented Aug 24, 2015

This addresses issue #9386.

@michelk: would you like to test? thanks.

@michelk
Copy link
Contributor

michelk commented Aug 24, 2015

Thanks a lot. Just tested locally and this does solve the issue.

@ttuegel ttuegel added 0.kind: bug Something is broken 6.topic: python labels Aug 24, 2015
@michelk
Copy link
Contributor

michelk commented Aug 25, 2015

I guess QGIS could be fixed in a similar way. Currently, when starting QGIS, I get

Traceback (most recent call last):
  File "/nix/store/8hg8mmi8lb05a673jmv4dfs24hmfrwcs-gdal-2.0.0/lib/python2.7/site-packages/site.py", line 75, in <module>
    __boot()
  File "/nix/store/8hg8mmi8lb05a673jmv4dfs24hmfrwcs-gdal-2.0.0/lib/python2.7/site-packages/site.py", line 35, 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

With the nix-shell-trick, it works.

@vbgl
Copy link
Contributor Author

vbgl commented Aug 26, 2015

@michelk could you be clearer about how you get this QGIS error, please? I cannot reproduce it.

@michelk
Copy link
Contributor

michelk commented Aug 26, 2015

I'm using nixpkgs on a debian system.

With

nix-env -iA nixpkgs.qgis 
qgis

I'm getting the error listed above.

Though

nix-shell -p python qgis
 qgis

works.

@vbgl
Copy link
Contributor Author

vbgl commented Aug 26, 2015

Strange… Are you using any particular plug-in? Is this behaviour new or have you always got such an error?

@domenkozar
Copy link
Member

If you fix qgis, I'll also push to release-15.09

@michelk
Copy link
Contributor

michelk commented Sep 3, 2015

I'm using some plug-ins, but when they were failing (eg. missing python-dependency), I got an error and the plugin was automatically disabled, but QGIS was running correctly.

I never used nixpkgs-QGIS in production, since previously there was a mismatch between compiled and running libpng; therefor I always used the debian-QGIS.

@vbgl
Copy link
Contributor Author

vbgl commented Sep 10, 2015

I suggest to merge this PR, as it fixes an issue with gdal. I don’t understand what breaks qgis, so I can’t fix it.

vbgl added a commit that referenced this pull request Sep 10, 2015
gdal: fix standalone python programs (fixes #9386)
@vbgl vbgl merged commit 83fe2a4 into NixOS:master Sep 10, 2015
@vbgl vbgl deleted the gdal branch May 22, 2019 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants