Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install Err on Ubuntu Server 12.04.4. It requires python plus a bunch of dependencies.

When I followed the install instructions, I couldn't get it to work using the "default" which appeared to be Python 2.7. There seems to be a circular dependency in sleekxmpp (one of the requirements):

ImportError: cannot import name resolver

So my idea is to use Python 3 instead. My system has all of this installed:

python                                          install
python-apt-common                               install
python-dbus-dev                                 install
python-minimal                                  install
python-pip                                      install
python-pkg-resources                            install
python-setuptools                               install
python2.7                                       install
python2.7-minimal                               install
python3                                         install
python3-minimal                                 install
python3.2                                       install
python3.2-minimal                               install

When I use pip to install stuff, I have no idea if it's using python 2, or 3, or really, what anything is using (I can't see how to control which version of packages to install, what version of python these packages are based on with pip freeze).

I just want to have an environment that uses the latest version of Python 3 without all this other stuff confusing me. So I tried installing virtualenv and setting up the environment, but it appears to just be another python2.7 environment. In short I have no idea what's going on, and need some pointers.

share|improve this question
    
A lot of Ubuntu depends on Python 2 so you can't just get rid of it but you can set up a virtual environment. See this question: How to set up and use a virtual python environment in Ubuntu? –  Warren Hill Apr 3 at 14:06
add comment

1 Answer 1

up vote 1 down vote accepted

Err pulls in a lot of dependencies along with it, so I would suggest to use Virtualenv in order to install it. And since they mention that as of Err v2.0, they have written it with Python 3 in mind, you should use Python 3 if you can (although Err is compatible with Python 2.7 too).

To understand how to use virtualenv, have a look at its documentation and create a couple of them to play and understand the concept. Basically virtualenv is to keep the dependencies separate for each project and not to mix up with the ones already installed on the system by default.

Virtualenv comes by default in the standard library from Python 3.3 onwards. But since you have Python 3.2, we would need to install it first.

sudo apt-get install python3-pip
sudo pip3 install virtualenv

Now, create the virtualenv for installing Err and activate it following the documentation above. I don't have Python 3.2 so cannot test it right now, but the following should work (assuming you want to create it at ~/venv/py3-err/):

python3 virtualenv.py ~/venv/py3-err/
. ~/venv/py3-err/bin/activate

Once activated install Err using pip. Since, you are facing issues with sleekxmpp, a bug was reported in this regard and it has been fixed in their Github master branch. So, install it directly from there:

pip install https://github.com/gbin/err/archive/master.zip

If you get any build-errors in this step, download the basic build-packages and re-run the above command:

sudo apt-get install build-essential cmake libffi-dev

Once installed, you need to save the config-template.py as config.py in a separate data directory. cd to this directory and start it by just running err.py or err.py --daemon following the user guide.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.