python运行 mac 重新启动_清理Python模块并重新启动Mac OS X

I am not a total newbie but I am trying to install modules for quite a long time and at this point i would like to have a fresh start and install python and all the modules I need so i really understand them. My problem is that some of them import, but most of them install either to the wrong site-packages or dont import maybe because i messed up my system/python. Also I tried the PYTHONPATH and PATH to set this up right, but it never worked.

So my questions are:

Is there a way to ensure I can clean everything up and start from zero ?

Ideally this would be without having to set up Mac OSX new.

Is there a way to install all the modules in the correct place (whatever the directory is I dont care, it should just work)?

Is there a good step-by-step description on how installing modules works. And I dont mean just the info to use easy_install, pip install etc, but a way to fully understand what I need to consider, where I need to put them, why these modules are recognized in certain directories, how the system finds them and most important what are the most common pitfalls and how to avoid them.

I also tried Macports and various other similiar ways to install but even if some of them worked and while I am sure that these are really great tools, most I had to hack to work.

So if someone can recommend a good and stable way to install a lot of modules at once, this would be incredibly useful.

Thanks a lot !!!!

And sorry for the long questions.

解决方案Is there a way to install all the modules in the correct place?

Download and untar/gunzip/etc the module source (Most of the modules ares available in gzip form at

[ 11:06 jon@hozbox.com ~ ]$ ./configure --prefix=/usr/local

/usr/local is usually the default, but it doesn't hurt to specify it and will ensure that every module you install will be placed in /usr/local/lib/python/...

Is there a good step-by-step description on how installing modules works?

The Python website has a great page called: Installing Python Modules

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值