[Moin-user] Problems after Debian upgrade

Tasslehoff Burrfoot tasslehoff at burrfoot.it
Wed May 22 13:17:35 EDT 2013


First of all let me thank all of you for quick reply and for your time :)

> my guess is that you upgraded from python 2.6 to 2.7. This means that
> you might have to reinstall all python packages that you manually
> installed (like moin).
> Check your /usr/local/lib/python2.[67]/dist-packages. You will probably
> find MoinMoin in 2.6 but not in 2.7.

I checked and confirm that under
/usr/local/lib/python2.6/dist-packages/ I got a MoinMoin file ad
directory, under /usr/local/lib/python2.7/dist-packages/ I got
nothing.
---
ritz:/usr/local/lib/python2.6/dist-packages# ls -l
/usr/local/lib/python2.7/dist-packages/
totale 0
ritz:/usr/local/lib/python2.6/dist-packages# ls -l
/usr/local/lib/python2.6/dist-packages/
totale 6
drwxr-sr-x  2 root staff  568 mar 18 23:12 jabberbot
-rw-r--r--  1 root staff 3203 mar 18 23:13 moin-1.9.7-py2.6.egg-info
drwxr-sr-x 28 root staff 1688 mar 18 23:13 MoinMoin

What should I do? I can safely create a symlink under
/usr/local/lib/python2.7/dist-packages/ to the python2.6/dist-packages
file and directory or there's a better solution.
I presume there's some compiled stuff in this directory.

Reguarding compile, I found this page
(http://moinmo.in/HelpOnUpdatingPython) and tried to lauch: python -c
"import compileall; compileall.compile_dir('/usr/local/share/moin')"
It seems to work without error but still nothing under
/usr/local/lib/python2.7/dist-packages/ and nothing changed on the
website.

I also tried to configure two alternatives for python using Debian
scripts (update-alternatives) but nothing changed, I presume because
wheezy mod_wsgi is compiled for the default distribution python
package (2.7.3).

Obviously on every test I tried to restart Apache to reload modules.

> For every python upgrade, you need to run moin --config-dir=...
> --wiki-url=http://... maint cleancache for each of your wikis.
>
> Run the command using the same user as the moin process owner.

I got some problems lauching this command (also as root or apache
user), I got this error:
Traceback (most recent call last):
  File "/usr/local/bin/moin", line 5, in <module>
    from MoinMoin.script.moin import run
ImportError: No module named MoinMoin.script.moin

I thought it was caused by packages under Python directory, so I tried
to lauch It directly using python2.6 binary and it worked:
apache at ritz:~$ /usr/bin/python2.6 $(which moin)
--config-dir=/usr/local/share/moin --wiki-url=wiki/ maint cleancache
2013-05-22 19:10:06,404 INFO MoinMoin.log:151 using logging
configuration read from built-in fallback in MoinMoin.log module
2013-05-22 19:10:06,407 INFO MoinMoin.log:157 Running MoinMoin 1.9.7
release code from /usr/local/lib/python2.6/dist-packages/MoinMoin
2013-05-22 19:10:07,341 WARNING MoinMoin.log:112
/usr/local/lib/python2.6/dist-packages/MoinMoin/support/pygments/plugin.py:39:
UserWarning: Module pygments was already imported from
/usr/local/lib/python2.6/dist-packages/MoinMoin/support/pygments/__init__.pyc,
but /usr/lib/python2.6/dist-packages is being added to sys.path
2013-05-22 19:10:08,411 INFO MoinMoin.config.multiconfig:127 using
wiki config: /usr/local/share/moin/wikiconfig.pyc

> BTW, you never should load mod_wsgi (needed by moin) and mod_python
> (needed by what?) at the same time.
>
> In fact, you should not use mod_python at all any more. It's dead and
> smells strangely since quite a while.

You're right, I don't use mod_python, perhaps it's an old module from
previous setup, this server was installed as Debian etch and upgraded
to lenny, squeeze and now wheezy, on an old Via EPIA 5000A.
I immediately removed it.

Thanks

Tasslehoff Burrfoot

---
Public PGP key block at
http://tasslehoff.burrfoot.it/url/pgp




More information about the Moin-user mailing list