Bienvenue! Inscrivez-vous et rejoignez notre communauté :)
  • Login:

Bienvenue sur Forum SIG - Systèmes d'Information Géographique et Géomatique.

Bienvenue sur le forumSIG. S'il s'agit de votre première visite, assurez vous de faire une recherche préalable dans les FAQ SIG. Vous devez vous inscrire avant de pouvoir poster.

Page 1 sur 2 12 DernièreDernière
Affichage des résultats 1 à 15 sur 16
  1. #1

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut QGIS 2 et problèmes python sous Mac os

    Bonjour,

    Je tente de déployer depuis plusieurs années QGIS dans ma structure (100% sous osx) et nous rencontrons chez de nombreux utilisateurs des problèmes avec les extensions pythons.

    Dans mon cas, avec la version 2.18.15 je rencontre les erreurs suivantes:

    2018-01-23T09:53:17    1    Traceback (most recent call last):
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 333, in startPlugin
    plugins[packageName] = package.classFactory(iface)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/__init__.py", line 29, in classFactory
    from MetaSearch.plugin import MetaSearchPlugin
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/plugin.py", line 33, in <module>
    from MetaSearch.dialogs.maindialog import MetaSearchDialog
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/dialogs/maindialog.py", line 48, in <module>
    from MetaSearch.dialogs.manageconnectionsdialog import ManageConnectionsDialog
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py", line 35, in <module>
    from MetaSearch.util import (get_connections_from_file, get_ui_class,
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/util.py", line 40, in <module>
    from pygments import highlight
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    ImportError: No module named pygments



    2018-01-23T09:53:17    1    warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:81: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_adapter(datetime.date, adapt_date)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()

    2018-01-23T09:53:17 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:82: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_adapter(datetime.datetime, adapt_datetime)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()

    2018-01-23T09:53:17 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:83: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_converter("date", convert_date)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()

    2018-01-23T09:53:17 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:84: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_converter("timestamp", convert_timestamp)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()



    Il m'est également impossible d'utiliser et d'installer l'extension OSM tools par exemple et les bases de données Spatialite. Ce qui commence à faire beaucoup de problèmes.

    J'ai tenté plusieurs choses: installer la version de développement de QGIS 3 via homebrew (ce que j'ai résussi mais avec quelques erreurs) et désinstaller totalement qgis via un AppCleaner + supprimer org.qgis.QGIS2.plist une fois tous les paquets ré-installés.

    Rien n'a changé.

    Avez vous une idée de comment relancer tout ça proprement?

    Merci d'avance
    Dernière modification par gene ; 23/01/2018 à 10h08.

  2. #2
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    C'est certainement un problème de Path (chemin), mais sérions les problèmes (voir Python sur Mac OS X: le point de la situation )

    1) Les versions QGIS de Kyng Chaos utilisent exclusivement une des versions de Python préinstallées (Apple Python, version 2.7.x)
    2) Les versions QGIS de Homebrew utilisent une des versions Python de Homebrew

    Dans votre cas, quelle est la version utilisée par défaut par le système ? (ouvrez Terminal.app et tapez "which python")

    La première erreur indique seulement que le module Pygments n'est pas installé
    Le deuxième point n'est pas une erreur, mais un simple avertissement ('warning')

    L' extension OSM tools utilise les modules Python requests et shapely qu'il faut installer.

    Donc, toujours dans Terminal.app, tapez "python" puis


    import pygments
    import pyspatialite # pour les bases spatialite
    import requests # pour le plugin
    import shapely # pour le plugin
    Dernière modification par gene ; 23/01/2018 à 10h51.
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  3. #3

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Merci pour ces réponses c'est déjà un peu plus clair pour moi.


    En tapant "which python" dans le terminal j'obtiens la réponse suivante:
    "/usr/bin/python"

    J'ai essayé d'installer les modules via le terminal mais pour "pygments" j'ai une erreur module non existant et pour les autres rien de ne se passe. Quand j'essaye de fermer le terminal il me dit qu'il y a un processus en cours, mais je suis en fibre 200M et j'ai attendu plusieurs minutes sans voir une seule ligne apparaitre...
    Last login: Tue Jan 23 14:24:55 on ttys000
    Arthur:~ arthur$ python
    Python 2.7.10 (default, Feb 7 2017, 00:08:15)
    [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyspatialite
    >>>

    Dernière modification par gene ; 23/01/2018 à 14h21.

  4. #4
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Comment avez-vous fait pour installer les modules ?
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  5. #5

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Comme indiqué dans la citation et votre message, dans le terminal, j'ai tapé "python" puis "import pyspatialite" ce qui n'a pas donné de grand résultat.
    J'ai ensuite trouvé sur un autre topic la commande sudo easyinstall pyspatialite qui a eu l'air de plus fonctionner.

    Mais après ces installation les messages d'erreur restent:
    2018-01-23T15:38:57	1	warning:/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py:607: UserWarning: Module shapely was already imported from /Library/Frameworks/GEOS.framework/Versions/3/Python/2.7/site-packages/shapely/__init__.pyc, but /Library/Python/2.7/site-packages/Shapely-1.6.3-py2.7-macosx-10.12-intel.egg is being added to sys.path
    mod = _builtin_import(name, globals, locals, fromlist, level)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 333, in startPlugin
    plugins[packageName] = package.classFactory(iface)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/__init__.py", line 29, in classFactory
    from MetaSearch.plugin import MetaSearchPlugin
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/plugin.py", line 33, in <module>
    from MetaSearch.dialogs.maindialog import MetaSearchDialog
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/MetaSearch/dialogs/maindialog.py", line 43, in <module>
    from owslib.csw import CatalogueServiceWeb
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/owslib/csw.py", line 27, in <module>
    from owslib.util import OrderedDict
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/owslib/util.py", line 15, in <module>
    import pytz
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/pytz/__init__.py", line 29, in <module>
    from pkg_resources import resource_stream
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3095, in <module>
    @_call_aside
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3081, in _call_aside
    f(*args, **kwargs)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3120, in _initialize_master_working_set
    add_activation_listener(lambda dist: dist.activate())
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 972, in subscribe
    callback(dist)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3120, in <lambda>
    add_activation_listener(lambda dist: dist.activate())
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2638, in activate
    self.insert_on(path)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2732, in insert_on
    self.check_version_conflict()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2774, in check_version_conflict
    " to sys.path" % (modname, fn, self.location),

    2018-01-23T15:38:58 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:81: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_adapter(datetime.date, adapt_date)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()

    2018-01-23T15:38:58 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:82: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_adapter(datetime.datetime, adapt_datetime)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()

    2018-01-23T15:38:58 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:83: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_converter("date", convert_date)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()

    2018-01-23T15:38:58 1 warning:/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py:84: DeprecationWarning: Converters and adapters are deprecated. Please use only supported SQLite types. Any type mapping should happen in layer above this module.
    register_converter("timestamp", convert_timestamp)

    traceback: File "<string>", line 1, in <module>
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 298, in loadPlugin
    __import__(packageName)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 29, in <module>
    from processing.tools.general import * # NOQA
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 31, in <module>
    from processing.core.Processing import Processing
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 42, in <module>
    from processing.script.ScriptUtils import ScriptUtils
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 30, in <module>
    from processing.script.ScriptAlgorithm import ScriptAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithm.py", line 33, in <module>
    from processing.core.GeoAlgorithm import GeoAlgorithm
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/GeoAlgorithm.py", line 41, in <module>
    from processing.core.parameters import ParameterRaster, ParameterVector, ParameterMultipleInput, ParameterTable, Parameter
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/parameters.py", line 32, in <module>
    from processing.tools.vector import resolveFieldIndex
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/vector.py", line 47, in <module>
    from processing.tools import dataobjects, spatialite, postgis
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/spatialite.py", line 29, in <module>
    from pyspatialite import dbapi2 as sqlite
    File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
    File "/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/dbapi2.py", line 86, in <module>
    register_adapters_and_converters()
    Dernière modification par gene ; 23/01/2018 à 15h40.

  6. #6
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    ou là là, vous avez un gros problème avec Python il me semble.

    Pour installer un module Python cela se fait maintenant avec pip et sudo


    sudo -H pip install requests
    sudo -H pip install shapely
    # etc..



    Théoriquement, si vous avez installé le Framework SQLITE de Kyng Chaos, Pyspatialite est déjà installé


    $ python
    Python 2.7.10 (default, Jul 14 2015, 19:46:27)
    [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pyspatialite
    >>> pyspatialite.__file__
    '/Library/Frameworks/SQLite3.framework/Versions/C/Python/2.7/pyspatialite/__init__.pyc'
    >>>
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  7. #7

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Merci pour le suivi,

    J'ai effectué ces commandes et j'ai eu comme retour: "Requirement already satisfied" pour
    - requests
    - shapely

    Une erreur pour pyspatialite
    Arthur:~ arthur$ sudo -H pip install pyspatialite
    Collecting pyspatialite
    Downloading pyspatialite-3.0.1-alpha-0.tar.gz (2.6MB)
    100% |████████████████████████████████| 2.6MB 408kB/s
    Installing collected packages: pyspatialite
    Running setup.py install for pyspatialite ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-7BBdU0/pyspatialite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-t0YLHe-record/install-record.txt --single-version-externally-managed --compile:
    /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/dist.py:285: UserWarning: Normalizing '3.0.1-alpha-0' to '3.0.1a0'
    normalized_version,
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-intel-2.7
    creating build/lib.macosx-10.12-intel-2.7/pyspatialite
    copying lib/pyspatialite/__init__.py -> build/lib.macosx-10.12-intel-2.7/pyspatialite
    copying lib/pyspatialite/dbapi2.py -> build/lib.macosx-10.12-intel-2.7/pyspatialite
    copying lib/pyspatialite/dump.py -> build/lib.macosx-10.12-intel-2.7/pyspatialite
    running build_ext
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/tmp/pip-build-7BBdU0/pyspatialite/setup.py", line 309, in <module>
    main()
    File "/private/tmp/pip-build-7BBdU0/pyspatialite/setup.py", line 306, in main
    setup(**get_setup_args())
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/install.py", line 61, in run
    return orig.install.run(self)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
    self.run_command('build')
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/build_ext.py", line 49, in run
    _build_ext.run(self)
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 337, in run
    self.build_extensions()
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 446, in build_extensions
    self.build_extension(ext)
    File "/private/tmp/pip-build-7BBdU0/pyspatialite/setup.py", line 175, in build_extension
    self.check_header(ext,"proj_api.h")
    File "/private/tmp/pip-build-7BBdU0/pyspatialite/setup.py", line 154, in check_header
    raise HeaderNotFoundException("cannot find %s, bailing out" % header)
    __main__.HeaderNotFoundException: cannot find proj_api.h, bailing out

    ----------------------------------------
    Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-7BBdU0/pyspatialite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-t0YLHe-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-7BBdU0/pyspatialite/
    Et une installation réussie pour pygments

  8. #8
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Pour rappel Pyspatialie est déjà installé
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  9. #9

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Pourtant il m'est impossible de créer une nouvelle table, j'obtiens l'erreur:
    The SQL query seems to be invalid.

    no such function: spatialite_version

  10. #10
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Quelle est votre manière de procéder ?
    Dernière modification par gene ; 24/01/2018 à 16h47.
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  11. #11

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    En lançant l'extension, n'ayant pas de connexion existante vers une base de donnée sur ce nouveau projet, il me propose de créer une nouvelle base spatialite, je choisis un nom et un emplacement, et j'obtiens ce message d'erreur.

  12. #12
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Testez

    Cliquez sur l'image pour la voir en taille réelle 

Nom : 		spatiallite.png 
Affichages :	24 
Taille :		203,2 Ko 
ID : 			9000

    ou

    Cliquez sur l'image pour la voir en taille réelle 

Nom : 		python.png 
Affichages :	23 
Taille :		76,1 Ko 
ID : 			9001
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  13. #13

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    Bonjour,
    Merci du suivi. Je n'ai pas compris la première commande j'ai donc suivi la seconde. Sauf que le processus semble totalement bloqué:

    Pièce jointe 9002
    Dernière modification par gene ; 25/01/2018 à 08h50.

  14. #14
    Modérateur et rédacteur Supporter(rice)


    Date d'inscription
    octobre 2005
    Localisation
    Louvain-la-neuve
    Emploi
    Géologue
    Organisme
    Université Catholique de Louvain - Région Wallonne
    Messages
    2 653

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    La première commande fait appel à la commande spatialite située dans les spatialite tools de KyngChaos

    La deuxième commande n'est pas "totalement bloquée" mais signifie simplemnt que le module pyspatialite a bien été importé. Comme vous êtes dans le Shell python interactif, il attend simplement une autre commande (comme dans mon exemple)

    Donc en pratique spatialite fonctionne chez vous
    "Caminante, no hay camino, el camino se hace al andar" A. Machado

  15. #15

    Date d'inscription
    février 2010
    Messages
    31

    Par défaut Re : QGIS 2 et problèmes python sous Mac os

    En théorie oui mais pas en pratique. Je sais qu'il y a un problème avec la version 2.18, mais je pensais celà réglé.

    Ce problème n'est pas seulement présent sur mon poste mais également chez des collègues.
    Dernière modification par agone ; 25/01/2018 à 15h29.

 

 
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. [QGIS 2.x] Programmation sous Python de l'orientation du composeur de Qgis
    Par NicolasGéniteau dans le forum Assistance et Programmation
    Réponses: 2
    Dernier message: 27/04/2015, 16h51
  2. [QGIS 2.x] QGIS Python & arcgis installés : soucis en python sur QGIS
    Par tenson dans le forum Assistance et Programmation
    Réponses: 0
    Dernier message: 27/11/2014, 16h30
  3. [QGIS 2.x] Exécution du code python Tkinter sous Qgis 2.0
    Par nora 27 dans le forum Assistance et Programmation
    Réponses: 4
    Dernier message: 18/06/2014, 09h56
  4. [QGIS 1.x] Installation de QGIS 1.8 sous Ubuntu : librairies GDAL et python posent problème
    Par Imas dans le forum Assistance et Programmation
    Réponses: 7
    Dernier message: 11/10/2013, 09h56
  5. [ArcGIS 9.x] Problèmes de calage de données réalisées sous Illustrator
    Par elbasias dans le forum Assistance Technique
    Réponses: 2
    Dernier message: 06/02/2009, 13h27

Les tags pour cette discussion

Liens sociaux

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •