Hi Davide,
Am 04.05.17 um 10:09 schrieb Davide Liessi:
2017-05-04 1:39 GMT+02:00 Thomas Ruedas <trg...@gmail.com>:
Your problem is really strange: Frescobaldi simply does 'import sip',
which should result in importing the Python 3.5 sip module, since you
are running Frescobaldi with Python 3.5; it should not even see the
Python2.7 module.

Please do the following in a Terminal and send the output:
/opt/local/bin/python3.5 -v
import sip
exit()
See below. If it shouldn't even see the 2.7 module, maybe it has to do with some entries in my .profile from some earlier installation:
# Setting PATH for Python 2.7
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
export PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/:$PYTHONPATH

Macports seems to have amended my .profile on earlier occasions when I made Python upgrades, and I have never touched them. Actually, the $PATH modification appears three times there, because apparently it was never checked whether it was already there.
Best,
Thomas

> /opt/local/bin/python3.5 -v
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
import '_io' # <class '_frozen_importlib.BuiltinImporter'>
import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
# /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/__init__.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__init__.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/__init__.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/codecs.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/codecs.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/codecs.cpython-35.pyc'
import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
import 'codecs' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8cf518> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/aliases.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/aliases.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/aliases.cpython-35.pyc' import 'encodings.aliases' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8ea128> import 'encodings' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8cf128> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/utf_8.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/utf_8.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/utf_8.cpython-35.pyc' import 'encodings.utf_8' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8efeb8>
import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/latin_1.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/latin_1.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/encodings/__pycache__/latin_1.cpython-35.pyc' import 'encodings.latin_1' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8f3978> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/io.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/io.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/io.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/abc.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/abc.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/abc.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_weakrefset.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_weakrefset.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_weakrefset.cpython-35.pyc' import '_weakrefset' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8f85f8> import 'abc' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8f3dd8> import 'io' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8f3b70> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/site.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/site.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/os.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/os.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/os.cpython-35.pyc'
import 'errno' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/stat.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/stat.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/stat.cpython-35.pyc'
import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
import 'stat' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9795f8> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/posixpath.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/posixpath.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/posixpath.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/genericpath.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/genericpath.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/genericpath.cpython-35.pyc' import 'genericpath' # <_frozen_importlib_external.SourceFileLoader object at 0x10c97ce80> import 'posixpath' # <_frozen_importlib_external.SourceFileLoader object at 0x10c979940> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_collections_abc.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_collections_abc.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_collections_abc.cpython-35.pyc' import '_collections_abc' # <_frozen_importlib_external.SourceFileLoader object at 0x10c986518> import 'os' # <_frozen_importlib_external.SourceFileLoader object at 0x10c90a3c8> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_sitebuiltins.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_sitebuiltins.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_sitebuiltins.cpython-35.pyc' import '_sitebuiltins' # <_frozen_importlib_external.SourceFileLoader object at 0x10c90a6a0> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sysconfig.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/sysconfig.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sysconfig.cpython-35.pyc' import 'sysconfig' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9c8358> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_sysconfigdata.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_sysconfigdata.cpython-35.pyc' import '_sysconfigdata' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9cc9e8> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_osx_support.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_osx_support.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_osx_support.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/re.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/re.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/re.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sre_compile.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/sre_compile.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sre_compile.cpython-35.pyc'
import '_sre' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sre_parse.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/sre_parse.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sre_parse.cpython-35.pyc' # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sre_constants.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/sre_constants.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/sre_constants.cpython-35.pyc' import 'sre_constants' # <_frozen_importlib_external.SourceFileLoader object at 0x10ca21e48> import 'sre_parse' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9ea550> import 'sre_compile' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9e2588>
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
# /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/copyreg.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/copyreg.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/copyreg.cpython-35.pyc' import 'copyreg' # <_frozen_importlib_external.SourceFileLoader object at 0x10ca33c50> import 're' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9de6a0> import '_osx_support' # <_frozen_importlib_external.SourceFileLoader object at 0x10c9d99e8> # /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_bootlocale.cpython-35.pyc matches /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/_bootlocale.py # code object from '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/__pycache__/_bootlocale.cpython-35.pyc' import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x10ca33b70> import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x10c8feef0>
Python 3.5.3 (default, Apr 23 2017, 18:02:29)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
# code object from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline.py # could not create '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/__pycache__': PermissionError(13, 'Permission denied') # wrote '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/__pycache__/readline.cpython-35.pyc'
# destroy readline
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
# code object from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline.py # could not create '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/__pycache__': PermissionError(13, 'Permission denied') # wrote '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/__pycache__/readline.cpython-35.pyc'
# destroy readline
>>> import sip
exit()Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 577, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 914, in create_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sip.so, 2): Symbol not found: _PyCObject_Type Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sip.so
  Expected in: flat namespace
in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/sip.so
>>>
# clear builtins._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.__interactivehook__
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup[2] removing _sysconfigdata
# destroy _sysconfigdata
# cleanup[2] removing _warnings
# cleanup[2] removing abc
# cleanup[2] removing _collections_abc
# destroy _collections_abc
# cleanup[2] removing sre_compile
# cleanup[2] removing builtins
# cleanup[2] removing sre_parse
# cleanup[2] removing _weakrefset
# destroy _weakrefset
# cleanup[2] removing sys
# cleanup[2] removing stat
# cleanup[2] removing _signal
# cleanup[2] removing re
# cleanup[2] removing io
# destroy io
# destroy abc
# cleanup[2] removing site
# destroy site
# cleanup[2] removing sre_constants
# destroy sre_constants
# cleanup[2] removing _frozen_importlib
# cleanup[2] removing posixpath
# cleanup[2] removing os
# cleanup[2] removing codecs
# cleanup[2] removing _frozen_importlib_external
# cleanup[2] removing __main__
# destroy __main__
# cleanup[2] removing copyreg
# cleanup[2] removing _imp
# cleanup[2] removing _io
# cleanup[2] removing _locale
# cleanup[2] removing genericpath
# cleanup[2] removing _stat
# cleanup[2] removing encodings.utf_8
# cleanup[2] removing errno
# cleanup[2] removing _weakref
# cleanup[2] removing _sre
# cleanup[2] removing _sitebuiltins
# cleanup[2] removing encodings.aliases
# cleanup[2] removing encodings.latin_1
# cleanup[2] removing zipimport
# cleanup[2] removing _osx_support
# destroy _osx_support
# cleanup[2] removing posix
# cleanup[2] removing atexit
# cleanup[2] removing _thread
# cleanup[2] removing _bootlocale
# destroy _bootlocale
# cleanup[2] removing os.path
# cleanup[2] removing sysconfig
# destroy sysconfig
# cleanup[2] removing marshal
# cleanup[2] removing _codecs
# cleanup[2] removing encodings
# destroy encodings
# destroy zipimport
# destroy _signal
# destroy _sitebuiltins
# destroy posixpath
# destroy errno
# destroy _stat
# destroy genericpath
# destroy stat
# destroy re
# destroy os
# destroy sre_compile
# destroy copyreg
# destroy sre_parse
# destroy _sre
# destroy _locale
# destroy atexit
# cleanup[3] wiping _warnings
# cleanup[3] wiping _frozen_importlib
# destroy _frozen_importlib_external
# cleanup[3] wiping codecs
# cleanup[3] wiping _imp
# cleanup[3] wiping _io
# cleanup[3] wiping encodings.utf_8
# cleanup[3] wiping _weakref
# cleanup[3] wiping encodings.aliases
# cleanup[3] wiping encodings.latin_1
# cleanup[3] wiping posix
# cleanup[3] wiping _thread
# cleanup[3] wiping marshal
# cleanup[3] wiping _codecs
# cleanup[3] wiping sys
# cleanup[3] wiping builtins

_______________________________________________
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users

Reply via email to