安装Pycharm

Ubuntu使用pycharm

官网地址
这里以Ubuntu1604 LTS----下载pycharm-community-2021.2.1.tar

解压安装

sudo tar -zxvf pycharm-community-2021.2.1.tar -C /usr/local
cd /usr/local/pycharm2021.2.1/bin

#安装
./pycharm.sh

打开后直接锁定到侧边栏(在侧边栏右键–lock to launcher)or 创建桌面
在这里插入图片描述

或者配置桌面应用 pycharm.desktop

[Desktop Entry]
 
Type=Application
Name=Pycharm
GenericName=Pycharm3
Comment=Pycharm3:The Python IDE
Exec="/home/lauf1/.software/pycharm-community-2019.3.1/bin/pycharm.sh" %f
Icon=/home/lauf1/.software/pycharm-community-2019.3.1/bin/pycharm.png
Terminal=pycharm
Categories=Pycharm;

然后更改文件的可执行权限,双击即可执行。
将该文件复制到~/.local/share/applications/,然后点击桌面左下角‘显示应用程序’,搜索‘pycharm’,右键‘添加到收藏夹’。

使用pycharm

  1. 创建项目file>new project
    在这里插入图片描述

  2. 配置编辑内容字体大小
    file>settings>editor>font
    在这里插入图片描述
    这里Ctrl+ 展开代码 Ctrl- 折叠代码

  3. 为项目配置python解释器
    打开一个项目后,可以为它配置不同的python解释器
    在这里插入图片描述

  4. 代码自动补全
    默认可以自动补全

  5. 设置鼠标滚轮,控制字体大小
    file–settings----keymap— 搜索increase、decrease—双击
    在这里插入图片描述

  6. 快捷键
    Ctrl + F 查找
    Ctrl + R 替换
     
    其他参考
     
     

windows 使用Pycharm

若配置的环境与控制台不一致

# 查看的还是全局的环境
pip list
  1. 是否有中文路径
  2. 虚拟环境是否继承全局;
  3. 使用venv\Scripts\pip list; 此时应注意pip-script.py、pip3-script.py、pip3.6-script.py中的第一行的解释器的路径问题。

  

pip install cryptography 报错

可以解决sha256_password的问题!!
This package requires Rust >=1.41.0
If you are seeing a compilation error please try the following steps to successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust

    Python: 3.6.5
    platform: Windows-10-10.0.19041-SP0
    pip: 21.3.1
    setuptools: 59.6.0
    setuptools_rust: 1.1.2

解决:
下载 rustup,并安装;pip install cryptography
error: cargo failed with code: 101

更新pip: python -m pip install --upgrade pip
AttributeError: ‘NoneType’ object has no attribute ‘bytes’---------再次更新pip

最后安装cryptography
python -m pip install cryptography

成功!

  1. 安装python-alipay-sdk(支付宝开发工具)
#顺序安装
pip install cryptography

pip install pyopenssl

pip install python-alipay-sdk
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

laufing

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值