ImportError: No module named datetime with lp:click-toolbelt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.7 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Using lp:click-toolbelt, I get the attached error when running ./click-toolbelt with the new python2.7 2.7.8-7.
Short version:
---
Original exception was:
Traceback (most recent call last):
File "./click-toolbelt", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/
import plistlib
File "/usr/lib/
import datetime
ImportError: No module named datetime
---
Downgrading to 2.7.8-6ubuntu1 by downloading the older .deb:s from Launchpad fixes the issue, upgrading again bring the issue visible again.
Note: this is a earlier built click-toolbelt I'm running, since the build process from a clean checkout is quite error-prone.
description: | updated |
description: | updated |
according to Timo, this is in a virtualenv, where the python binary is copied, but not the standard library. The datetime extension is now built as a builtin, therefore the datetime module cannot be found anymore in the virtualenv. the solution is to re-create the virtualenv.