美文网首页
Python 初步

Python 初步

作者: michael_jia | 来源:发表于2022-07-11 23:07 被阅读0次

pdb

  • pdb — The Python Debugger

  • PyCharm

  • 在 jetbrains 官网下载,社区版就可以起步。

pip in Windows

  • 为了各版本兼容问题,python 在 Windows安装后,一般默认可用命令为 py,而非 python。
  • pip默认随附安装,通过 py -m pip --version 查看是否安装。
    Verification: You can check if pip is installed by running python -m pip --version or py -m pip --version in the command prompt.
    If pip is not found, you will receive an error message.
pip 25.2 from C:\Users\Administrator\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip (python 3.13)
  • pip 加入到 "环境变量" 中
    Verification: You can check your PATH environment variables by searching for "Environment Variables" in the Windows search bar and then clicking on "Edit the system environment variables." In the System Properties window, click "Environment Variables," and then under "System variables," find the "Path" variable and click "Edit." Ensure the Scripts directory of your Python installation is listed.
  • 如果不想把 pip 路径加到环境变量中,可以通过 py -m 直接显式调用 pip:
    Use python -m pip: As a workaround, you can always execute pip by explicitly calling the Python interpreter, for example: python -m pip install <package_name>. This bypasses the need for pip to be directly in the PATH.

pip 安装 Selenium 库

  1. 打开命令行:以管理员身份运行 Windows PowerShell。(普通的cmd权限不够)
  2. 执行命令 pip install selenium 下载并安装Selenium 库。
  3. 安装 webdriver-manager:pip install webdriver-manager

python version

In your Python interpreter, type the following commands:
>>> import os, sys
>>> os.path.dirname(sys.executable)
'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Python\\Python313'

相关文章

  • Python 初步

    第一个程序 新建 hello.py 文件 内容自定 如:print("Hello Python") 结尾的分号有...

  • Python初步

  • Python爬虫初步

    爬虫学习 目的:爬取壁纸并保存到本地 目标网站: http://desk.zol.com.cn/dongman/ ...

  • python爬虫初步

    和http(超文本传输协议) 爬虫步骤:确认需求》寻找需求》发送请求》解析数据》存储数据 python爬虫初步 编...

  • Python初步了解

    语言之间的对比 PHP类:适用于写网页,局限性 受欢迎度下降Python Java: 可以写网页 也可以写后台功...

  • python初步学习

    当数据较小时id所指向一个内存空间,较大时指向不同的内存空间 input有接收数据的功能,并将接受的数据转换成字符...

  • 初步尝试Python

    之前的Ruby学到手的内容有限,觉得好多东西自己无法理解。现在又重新出发,开始尝试学习Python。

  • Python:闪电批量文件重命名

    大致路径 对python只会打“hello,world”的基础下,安装了python3和pycharm; 初步了解...

  • GUI-Tkinter编程1

    tkinter是python内置库,可用于初步了解gui编程python自带的idle就是使用tkinter编写的...

  • Python网络爬虫(由简入深)

    本文章包含内容 一、Python必备基础认识二、Python编写的初步尝试(用Sublime Text编写)三、网...

网友评论

      本文标题:Python 初步

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