Ticket #29025 (closed defect: worksforme)
Problem with Trac and Python
| Reported by: | jc@… | Owned by: | dluke@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | ||
| Port: | trac |
Description (last modified by ryandesign@…) (diff)
I know that there already were a similar problem but i tested all solutions adviced on your site.
My problem is to access svn with trac. When i read the trac's log, i've the following lines :
Trac[svn_fs] INFO: Failed to load Subversion bindings
Traceback (most recent call last):
File "build/bdist.macosx-10.5-i386/egg/trac/versioncontrol/svn_fs.py", line 265, in __init__
_import_svn()
File "build/bdist.macosx-10.5-i386/egg/trac/versioncontrol/svn_fs.py", line 68, in _import_svn
from svn import fs, repos, core, delta
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/svn/fs.py", line 19, in <module>
from libsvn.fs import *
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/fs.py", line 7, in <module>
import _fs
ImportError: dlopen(/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/_fs.so, 2): Library not loaded: /opt/local/lib/libsvn_swig_py25-1.0.dylib
Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/_fs.so
Reason: image not found
My system : Mac OSX 10.5.8 with Python 2.5.1 and Subversion 1.6.16
I tried the followings :
sudo port install python_select sudo python_select python25 sudo port install subversion-python25bindings
and nothing works. With this, i've an Internal Server Error.
Best regards,
Change History
comment:2 Changed 2 years ago by dluke@…
It's complaining about /opt/local/lib/libsvn_swig_py25-1.0.dylib
Which should be installed as part of subversion-python25bindings.
What does 'ls -l /opt/local/lib/libsvn_swig_py25-1.0.dylib' say?
Should be:
/opt/local/lib/libsvn_swig_py25-1.0.dylib@ -> libsvn_swig_py25-1.0.0.0.dylib
and /opt/local/lib/libsvn_swig_py25-1.0.0.0.dylib should be there
If not, try uninstalling, cleaning and reinstalling subversion-python25bindings:
sudo port uninstall subversion-python25bindings sudo port clean --all subversion-python25bindings sudo port install subversion-python25bindings
comment:3 Changed 2 years ago by jmr@…
- Owner changed from macports-tickets@… to dluke@…
- Cc dluke@… removed
- Port set to trac
Doesn't trac depend on python26 and subversion-python26bindings?
comment:4 Changed 2 years ago by dluke@…
Oh, you're right, it does (and it uses the python26 portgroup, so it should be running setup.py with python26 and not seeing any python25 stuff).
Can you clean and install trac and attach the debug output here?
sudo port uninstall trac sudo port clean --all trac sudo port -dv install trac
comment:5 Changed 2 years ago by jc@…
Ok.
I tried :
sudo port uninstall trac sudo port clean --all trac sudo port -dv install trac
I always have the following error :
Unsupported version control system "svn": dlopen(/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/_fs.so, 2): Library not loaded: /opt/local/lib/libsvn_swig_py25-1.0.dylib Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/_fs.so Reason: image not found
Then I tried :
python_select python26
I tried on my terminal :
sh-3.2# python Python 2.6.6 (r266:84292, Apr 1 2011, 10:08:34) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from svn import fs >>> from svn import core >>>
No problem. But when i relaunched my trac site in browser section :
Unsupported version control system "svn": dlopen(/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/_fs.so, 2): Library not loaded: /opt/local/lib/libsvn_swig_py25-1.0.dylib Referenced from: /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/_fs.so Reason: image not found
Why does trac try to use python 2.5 so that trac is configured for python 2.6 ?
Best regards,
comment:6 Changed 2 years ago by dluke@…
You didn't post the output of the install command, so it's difficult to know what is happening.
If python_select fixes things, then there is a bug in the port that will be fixed (but it looks like there might be something else going on with your install as well).
comment:7 Changed 2 years ago by ryandesign@…
Please remember to preview before posting, and to use WikiFormatting.

