Kallithea issues archive

Issue #298: [doc] Kallithea fails to start after Lubuntu upgrade.

Reported by: BGW
State: new
Created on: 2017-09-10 16:24
Updated on: 2018-01-20 20:31

Description

I've been using Kallithea for some weeks now. Quite successfully.

Today I updated and restarted my Lubuntu SCM machine. When I tried to restart Kallithea this happened:

scm@scm:~/kallithea$ virtualenv ../kallithea-venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/scm/kallithea-venv/bin/python2
Not overwriting existing python script /home/scm/kallithea-venv/bin/python (you must use /home/scm/kallithea-venv/bin/python2)
Installing setuptools, pkg_resources, pip, wheel...done.

After this nothing worked. What do I need to do here to get Kallithea working?

Attachments

Comments

Comment by Mads Kiilerich, on 2017-09-10 20:55

There seems to be some misunderstanding or forgotten details.

The virtualenv command is a part of the documented setup procedure. Depending on which WSGI server you use to run Kallithea, you might have to source the virtualenv activate script to run Kallithea.

Comment by BGW, on 2017-09-14 01:35

Not being at all knowledgeable about Python I do not know what that involves. To clear up what I'm doing here are the instructions I used to enter to get Kallithea running:

cd kallithea
virtualenv ../kallithea-venv
source ../kallithea-venv/bin/activate
paster serve kallithea.ini

These worked well until my Lubuntu upgrade.

Here is what I get post upgrade:

scm@scm:~/kallithea$ virtualenv ../kallithea-venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/scm/kallithea-venv/bin/python2
Not overwriting existing python script /home/scm/kallithea-venv/bin/python
(you must use /home/scm/kallithea-venv/bin/python2)
Installing setuptools, pkg_resources, pip, wheel...done.
scm@scm:~/kallithea$ source ../kallithea-venv/bin/activate
(kallithea-venv) scm@scm:~/kallithea$ paster serve kallithea.ini
Traceback (most recent call last):
  File "/home/scm/kallithea-venv/bin/paster", line 11, in <module>
    sys.exit(run())
  File "/home/scm/kallithea-venv/local/lib/python2.7/site-packages/paste/script/command.py", line 91, in run
    commands = get_commands()
  File "/home/scm/kallithea-venv/local/lib/python2.7/site-packages/paste/script/command.py", line 133, in get_commands
    plugins = pluginlib.resolve_plugins(plugins)
  File "/home/scm/kallithea-venv/local/lib/python2.7/site-packages/paste/script/pluginlib.py", line 83, in resolve_plugins
    pkg_resources.require(plugin)
  File "/home/scm/kallithea-venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/scm/kallithea-venv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (setuptools 36.4.0 (/home/scm/kallithea-venv/lib/python2.7/site-packages), Requirement.parse('setuptools<34'), set(['Kallithea']))
(kallithea-venv) scm@scm:~/kallithea$ 

I do not know what this means. Since I'm not knowledgeable about Python I'm going to need some hand holding here. For instance when I receive the following message (from above):

New python executable in /home/scm/kallithea-venv/bin/python2
Not overwriting existing python script /home/scm/kallithea-venv/bin/python
(you must use /home/scm/kallithea-venv/bin/python2)

I ask myself where, how and when must I use

/home/scm/kallithea-venv/bin/python2

?

Hope you can help.

Comment by Thomas De Schampheleire, on 2017-09-14 10:08

The command virtualenv is used to create a new virtual env. This only needs to be done once, during installation of Kallithea.

Afterwards, with an existing installation present, you only need to enter the virtual env, using the command source ../kallithea-venv/bin/activate.

Based on your output, it seems you attempt to start Kallithea without reinstalling it, in which case you should not re-run the virtualenv command. However, I'm not sure what could have been broken now that you already did that. I think following command should restore things: pip install -e . (mind the dot).

If however, you do want/need to reinstall Kallithea, then you should follow the complete instructions, which also involve some more pip commands, see the instructions in the documentation.

Comment by BGW, on 2017-09-15 02:59

I couldn't get Kallithea to run again so I reinstalled it. Before doing that I backed up the db and ini files. The reinstall went very smoothly. Kallithea started no problem and my code repository is fine.

I'm changing my start up script, in the light of what I've learnt to:

cd kallithea
source ../kallithea-venv/bin/activate
paster serve kallithea.ini

I would like to confirm if this will work better. If so, I have one suggestion that you add a section in the documentation on how to start and stop Kallithea from the command line (lets not have people like me goofing it up!), and maybe on on how to make it start on machine startup (for Linux, Mac and Windows). This section should be designed for those of us who program, but not in Python, who know a bit about system admin but would have to work hard to write a bash script. (I'd like to just have Kallithea as a working tool... I know how to drive and do basic car maintenance but beyond that I'm lost, it should be similar with Kallithea.) Or, maybe some good links on how to do these steps (which will change and break, but if they get reviewed every month idiots like me should be O.K.).

Thanks for your help. I'm underway again.

Comment by Thomas De Schampheleire, on 2018-01-20 20:31

mark as documentation problem.