Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9204947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:50:01+00:00 2026-06-17T23:50:01+00:00

I recently tried installing powerline-vim, but have been running into problems with it. Every

  • 0

I recently tried installing powerline-vim, but have been running into problems with it.

Every time I open a new window, I see this error:

Error detected while processing function <SNR>9_UpdateWindows..<SNR>9_pyeval:
line   1:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <module>
File "opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/uuid.py", line 545, in uuid4 import random
File "opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/uuid.py", line 545, in uuid4 from os import urandom as _urandom
ImportError: cannot import name urandom

When I delete this line from my .vimrc file (effectively disabling powerline-vim) the error goes away.

python from powerline.ext.vim import source_plugin; source_plugin()

The curious thing about this is when I fire up python from the terminal, the imports work just fine.

 Python 2.7.3 (default, Nov 17 2012, 19:54:34) 
 [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import random
 >>> from os import urandom as _urandom
 >>> 

The output of which python:

/opt/local/bin/python

I am running OS X 10.8.2.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:50:03+00:00Added an answer on June 17, 2026 at 11:50 pm
    1. Check if your problem is related with that: Python: cannot import urandom module (OS X). Check your sys.path value. Make sure you import os module from your installation of Python, not from system Python.

    2. Check the log configure generates when you build Python for clues. Have you specified prefix when building Python?

    3. Edit the code and print os and sys.path just before the error occurs to check if the plugin changed something. If sys.path is modified, often you may find the place where it is by performing import sys; sys.path = tuple(sys.path). It does not crash on sys.path = smth, but crashes on append() and +=. Maybe that would be enough to show the place where path is modified.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone had success installing the Scala plugin into Netbeans recently? I tried to
I recently tried to combine SEAM and GWT in a project - but failed
I have recently upgraded some of my web applications to ASP.NET 3.5 by installing
I have recently tried to install TargetProcess http://www.targetprocess.com/ on my windows machine, which involves
I had been using eclipse in Ubuntu 9.10 without any problems. Recently I did
I tried geodjango recently, and worked just fine for me, even without installing that
Recently I change my NSIS-based installer from installing into the program files folder to
I have been having some problems with the test debugger in VS10. All tests
I recently tried to get GoogleTv android emulator running on my Ubuntu 12 Desktop
I just recently tried installing the Access Content Module to Drupal 5. The module

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.