美文网首页
mac-python3-PyCharm环境安装.md

mac-python3-PyCharm环境安装.md

作者: 7f2aceb77681 | 来源:发表于2018-11-01 18:13 被阅读76次

    mac默认已经带python环境,版本是2.7,这里记录一下安装最新版3.7,并且python3默认带有包管理工具pip3。

    一、安装python

    安装方式一:homebrew

    正常我们可以直接通过brew安装:brew install python3,一条命令就可以搞定了,但是公司网络实在是太慢了,所以只能放弃。

    安装方式二:安装包

    image.png

    官方下载:https://www.python.org/downloads,下载后一路确定下一步即可安装成功。

    验证环境是否成功

    # 查看python位置
    which python
    which python3
    
    # 查看python版本
    python --version
    python3 --version
    
    # 进入python交互模式
    python #直接输入python进入python2
    python3 #进入python3
    

    二、包管理工具pip3常用命令

    安装完python3后,默认已安装pip3,python2要手动安装pip。

    文档:https://pip.pypa.io/en/stable/quickstart/

    安装软件包:pip3 install 包名
    安装指定版本软件包:pip3 install 包名==版本号,如pip3 install requests==2.18
    查看已安装包:pip3 list
    查看包详情:pip3 show 包名
    查看过期的包:pip3 list --outdated
    安装本地的安装包:pip3 install 目录|文件名
    安装包到用户目录:pip3 install 包名 --user
    卸载包:pip3 uninstall 包名
    升级包:pip3 install 包名 --upgrade
    显示包所在目录:pip3 show -f 包名
    搜索包:pip3 search 关键字
    查询可升级的包:pip3 list -o
    查看命令:pip3 --help

    三、PyCharm安装与破解

    官方下载:https://www.jetbrains.com/pycharm/download/#section=mac

    破解步骤(参考:https://blog.csdn.net/u014044812/article/details/78727496

    1. 下载破解补丁
      链接: https://pan.baidu.com/s/1uIaUT1artYCffk9icrTbmA 提取码: 2aix 复制这段内容后打开百度网盘手机App,操作更方便哦

    2. JetbrainsCrack-3.1-release-enc.jar 文件复制到 /Applications/PyCharm.app/Contents/bin/ 目录中;

    3. 用编辑器打开 /Applications/PyCharm.app/Contents/bin/pycharm.vmoptions 文件,添加 -javaagent:JetbrainsCrack-3.1-release-enc.jar 到最后一行;

    4. 打开PyCharm.app,输入以下激活码

    ThisCrackLicenseId-{
    "licenseId":"11011",
    "licenseeName":"Wechat",
    "assigneeName":"Naked sleep of pig",
    "assigneeEmail":"1113449881@qq.com",
    "licenseRestriction":"",
    "checkConcurrentUse":false,
    "products":[
    {"code":"II","paidUpTo":"2099-12-31"},
    {"code":"DM","paidUpTo":"2099-12-31"},
    {"code":"AC","paidUpTo":"2099-12-31"},
    {"code":"RS0","paidUpTo":"2099-12-31"},
    {"code":"WS","paidUpTo":"2099-12-31"},
    {"code":"DPN","paidUpTo":"2099-12-31"},
    {"code":"RC","paidUpTo":"2099-12-31"},
    {"code":"PS","paidUpTo":"2099-12-31"},
    {"code":"DC","paidUpTo":"2099-12-31"},
    {"code":"RM","paidUpTo":"2099-12-31"},
    {"code":"CL","paidUpTo":"2099-12-31"},
    {"code":"PC","paidUpTo":"2099-12-31"}
    ],
    "hash":"2911276/0",
    "gracePeriodDays":7,
    "autoProlongated":false}
    

    相关文章

      网友评论

          本文标题:mac-python3-PyCharm环境安装.md

          本文链接:https://www.haomeiwen.com/subject/dpdtxqtx.html