您的位置:首页 > 编程语言 > Python开发

mac python Pycharm环境配置

2017-08-03 08:48 288 查看
首先,mac是自带python环境的,接下来我会讲一些我在使用Pycharm时遇到的一些坑。

1. 安装Pycharm破解版

获取破解过程以及安装包请点击我

安装第三方库

Pycharm自带了蛮多库,但有些非常实用的库,它并没有,需要我们手动添加。

添加过程:

1. (我mac上自带的是python2.6版本,版本太低,用brew install python命令安装了2.7版本)在Pycharm中点击File–>DefaultSetting–>Project Interpreter,如下图:



点击左下角”+”号,就可以选择自己想要的库进行安装。安装完后,点击apply。

2. Pycharm - Preference - Project:xxx - Python Interpreter 选择自己安装的python环境。

遇到的一些bug

使用Pycharm安装库异常

log如下

execution error: The directory '/Users/luoxiaohui/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.


提示安装无此权限,此时,需要在mac的控制台中安装了

sudo -H pip install yourwantlibrary


参考博客:

mac pycharm配置 python
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: