Notes
1.0.0
1.0.0
  • Introduction
  • Commands
    • cd
    • df
    • du
    • fc-cahe
    • ifconfig
    • ip
    • ls
    • lsb_release
    • mkdir
    • mksquashfs
    • mount
    • ping
    • pwd
    • rm
    • sar
    • sudo
  • Linux C
    • Preprocessor
    • Keywords
    • Kernel
      • Ftrace
      • Watchdog
  • Python
    • general
      • Decorator
      • Generator
      • Iterator
      • Lambda
    • Download
    • NIC
  • Network
    • Protocol
      • Link layer
      • IP
      • ARP
      • ICMP
    • Proxy
      • Cntlm
      • Proxychains4
      • ShadowSocks
    • Tools
      • iperf
      • tc
      • Wireshark
    • Apps
      • samba
      • tftp
  • Software
    • Atom
    • Chrome
    • Docker
    • Git
    • Gitbook
    • Hexo
    • Nodejs
    • Teraterm
    • Tex
    • Tmux
    • VIM
    • VSCode
  • Database
    • MongoDB
  • Web
    • CSS
    • LNMP
  • Tools
    • common
    • programming
  • Ubuntu
    • Add user
    • AWS EC2
    • FAQ
    • Installer
    • Shell
    • Shell scripts
    • Themes
    • VPS
  • Windows
    • PowerShell
    • CMD
    • FAQ
  • Aphorisms
  • Book List
  • Favorites
  • Appendix
    • ASCII
    • GSM
Powered by GitBook
On this page
  • install python3
  • install bs4
  • install requests
  • install phantomjs
  • install xpath
  • install pymouse & pykeyboard
  • install pyinstaller

Was this helpful?

  1. Python

general

PreviousPythonNextDecorator

Last updated 5 years ago

Was this helpful?

install python3

sudo apt-get install -y python3-dev build-essential libssl-dev libff i-dev libxml2 libxml2-dev libxslt1-dev zlib1g-dev libcurl4-openssl-d ev
sudo apt-get install -y python3

ref:

install bs4

如果在系统中只有一个版本的python3,可以直接安装

sudo apt-get install -y python-bs4

如果系统中包含python2,python3两个版本的话,使用上述指令只会安装用于python2的bs4,此时可以使用以下方法解决

sudo apt-get install -y python3-pip
sudo pip3 install beautifulsoup4
# how to use
>>> from bs4 import BeautifulSoup

ref:

install requests

sudo pip3 install requests
# how to use
>>> import requests

install phantomjs

  • installl nodejs first

npm -g install phantomjs-prebuilt

install xpath

sudo pip3 install lxml

install pymouse & pykeyboard

sudo apt-get install python-xlib
# pip3 install pymouse
sudo pip3 install PyUserInput

# how to use
>>> from pymouse import PyMouse
>>> from pykeyboard import PyKeyboard
>>>
>>> m = PyMouse()
>>> k = PyKeyboard()

install pyinstaller

pip3 install pyinstaller
pyinstall  **.py  # 直接打包
pyinstall -F **.py # 打包成单文件
pyinstall -W **.py # 去掉控制台窗口,黑窗口
pyinstall -i ***.ico **.py # 添加图标 ***
http://blog.csdn.net/HHTide/article/details/78192314
https://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html