Opened 14 years ago

Closed 13 years ago

#29025 closed defect (worksforme)

Problem with Trac and Python

Reported by: jc@… Owned by: danielluke (Daniel J. Luke)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: trac

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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 (8)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dluke@… added
Description: modified (diff)

comment:2 Changed 14 years ago by danielluke (Daniel J. Luke)

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 14 years ago by jmroot (Joshua Root)

Cc: dluke@… removed
Owner: changed from macports-tickets@… to dluke@…
Port: trac added

Doesn't trac depend on python26 and subversion-python26bindings?

comment:4 Changed 14 years ago by danielluke (Daniel J. Luke)

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 14 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 14 years ago by danielluke (Daniel J. Luke)

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 14 years ago by ryandesign (Ryan Carsten Schmidt)

Please remember to preview before posting, and to use WikiFormatting.

comment:8 Changed 13 years ago by danielluke (Daniel J. Luke)

Resolution: worksforme
Status: newclosed

closing due to lack of response.

Note: See TracTickets for help on using tickets.