Complete removal and fresh install of python on Ubuntu 12.04

你离开我真会死。 提交于 2020-01-24 10:36:29

问题


This is embarrassing to admit, but I just continue to struggle with setting up my Python environment on an Ubuntu install.

Sometimes I get it to work fine. But here's the problem:

I feel like whenever I sit down to do some hobby hacking on a python project, I end up spending hours on end just trouble shooting inconsistencies with my python installation. Right now I keep getting an error message of:

ImportError: cannot import name urandom 

when trying to import a module called googleplaces (https://github.com/slimkrazy/python-google-places).

But it's always something that causes me to go on an endless snipe hunt for the proper configuration of this that or the other.

I just want to work on the project, not plumb around endlessly in forums.

Which brings me to my point: How do I completely nuke my existing python setup (including virtualenv, pip, easy_install, etc. etc.) and just start from a completely clean slate? I have already tried reinstalling everything python from synaptic, but no success, still getting error.

UPDATE: I've reinstalled virtualenv and that seems "ok" so far. Found that my import error is a permissions problem, if I import in the interactive using sudo, it passes fine. How should I be correcting my permissions so I don't have to run sudo? (Probably close this and start a new question.)

来源:https://stackoverflow.com/questions/12449161/complete-removal-and-fresh-install-of-python-on-ubuntu-12-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!