Fix Python – How do I update a Python package?

I’m running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2).
The 0.19.1 package has files in a number of locations including (/usr/share/pyshared and /usr/lib/pymodules.python2.6).
How can I completely uninstall version 0.19.1 fro….

Fix Python – Standard way to embed version into Python package?

Is there a standard way to associate version string with a Python package in such way that I could do the following?
import foo

I would imagine there’s some way to retrieve that data without any extra hardcoding, since minor/major strings are specified in already. Alternative solution that I found was to have import __….

Fix Python – Relative imports – ModuleNotFoundError: No module named x

This is the first time I’ve really sat down and tried python 3, and seem to be failing miserably. I have the following two files: has a few functions defined in it as well as a few variables. I’ve stripped it down to the following:
debug = True
import config
print (config.debug)

I also have an __in….

Fix Python – Python 3: ImportError “No Module named Setuptools”

I’m having troubles with installing packages in Python 3.
I have always installed packages with install. But now, when I try to install the ansicolors package I get:
importerror “No Module named Setuptools”

I have no idea what to do because I didn’t have setuptools installed in the past. Still, I was able to install many packages with se….

Fix Python – How to fix “Attempted relative import in non-package” even with

I’m trying to follow PEP 328, with the following directory structure:

In I have the following import statement
from ..components.core import GameLoopEvents

However, when I run, I get the following error:
tests$ python ….