Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Startup error in pymode.vim #266

Closed
carlodicelico opened this Issue Jan 16, 2013 · 4 comments

Comments

Projects
None yet
4 participants
Error detected while processing /Users/carlodicelico/.spf13-vim-3/.vim/bundle/python-mode/plugin/pymode.vim:
line  129:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/carlodicelico/.spf13-vim-3/.vim/bundle/python-mode/pylibs/pymode/auto.py", line 2, in <module>
    from pylibs.autopep8 import fix_file
  File "/Users/carlodicelico/.spf13-vim-3/.vim/bundle/python-mode/pylibs/autopep8.py", line 43, in <module>
    import tempfile
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 34, in <module>
    from random import Random as _Random
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 47, in <module>
    from os import urandom as _urandom
ImportError: cannot import name urandom
line  248:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/carlodicelico/.spf13-vim-3/.vim/bundle/python-mode/pylibs/ropevim.py", line 4, in <module>
    import tempfile
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tempfile.py", line 34, in <module>
    from random import Random as _Random
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py", line 47, in <module>
    from os import urandom as _urandom
ImportError: cannot import name urandom

I'm able to import urandom at the python REPL.

I had the same problem and discovered a fix. I followed the steps in this SO answer to set-up a new python environment:

http://stackoverflow.com/questions/843531/using-virtualenv-on-mac-os-x/843539#843539

Someone with a similar error updated to 2.7.3 and that fixed it for them.

Contributor

bronzehedwick commented Aug 12, 2014

@carlodicelico, did alecdibble's answer solve the issue? If so please close :)

@jrobeson jrobeson added the needinfo label Aug 12, 2014

Whoops! Yes, that did it!

Contributor

bronzehedwick commented Aug 12, 2014

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment