Ubuntu 11.04: VirtualEnvironment - start ipython error after update at 3.10.2012

Bug #1060850 reported by Djien Kwee
10
This bug affects 2 people
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)[/media/wd40/VirtEnv_py2.7_Ubu/virtenv]:$ ipython
Traceback (most recent call last):
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/bin/ipython", line 8, in <module>
    load_entry_point('ipython==0.11', 'console_scripts', 'ipython')()
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 318, in load_entry_point
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2221, in load_entry_point
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1954, in load
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/ipython-0.11-py2.7.egg/IPython/__init__.py", line 43, in <module>
    from .config.loader import Config
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/ipython-0.11-py2.7.egg/IPython/config/loader.py", line 26, in <module>
    from IPython.utils.path import filefind, get_ipython_dir
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/ipython-0.11-py2.7.egg/IPython/utils/path.py", line 22, in <module>
    from IPython.utils import warn
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/ipython-0.11-py2.7.egg/IPython/utils/warn.py", line 19, in <module>
    from IPython.utils import io
  File "/media/wd40/VirtEnv_py2.7_Ubu/virtenv/local/lib/python2.7/site-packages/ipython-0.11-py2.7.egg/IPython/utils/io.py", line 18, in <module>
    import tempfile
  File "/usr/lib/python2.7/tempfile.py", line 34, in <module>
    from random import Random as _Random
  File "/usr/lib/python2.7/random.py", line 47, in <module>
    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
[~]:$

Revision history for this message
Djien Kwee (djienaijkwee) wrote :
Revision history for this message
nator (homebrewer-gmail) wrote :

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.

Revision history for this message
Paul Tagliamonte (paultag) wrote :

Bit my co-worker as well. Caused a bit of a frenzy

Marking invalid, but really really really annoying.

Changed in python2.7 (Ubuntu):
status: New → Invalid
Revision history for this message
Djien Kwee (djienaijkwee) wrote :

Thank you, reinstall the virtual environment over the existent one, works fine. Ipython can be used again without error

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.