Ubuntu 11.04: VirtualEnvironment - start ipython error after update at 3.10.2012
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python2.7 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Environment: Ubuntu 11.04
At 3.10.2012 there are 5 updates for python 2.7.1 (2.7.1-5ubuntu2, 2.7.1-5ubuntu2.2) and since then ipython in virtual environment produces import error: cannot import name urandom
(virtenv)
Traceback (most recent call last):
File "/media/
load_
File "/media/
File "/media/
File "/media/
File "/media/
from .config.loader import Config
File "/media/
from IPython.utils.path import filefind, get_ipython_dir
File "/media/
from IPython.utils import warn
File "/media/
from IPython.utils import io
File "/media/
import tempfile
File "/usr/lib/
from random import Random as _Random
File "/usr/lib/
from os import urandom as _urandom
ImportError: cannot import name urandom
No error in non-virtual environment
[~]:$ ipython
Python 2.7.1+ (r271:86832, Sep 27 2012, 21:16:52)
Type "copyright", "credits" or "license" for more information.
IPython 0.10.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]:
Do you really want to exit ([y]/n)? y
[~]:$
This just bit me as well. It's this bug: https:/ /bugs.launchpad .net/ubuntu/ +source/ python- defaults/ +bug/989856
Reinstalling the virtual environment over the old one seems to work fine, just run the same command you used to build it the first time.