linux系统pip默认使用python2,想使用python3解释器

能用代码说明一切就无需文字。

hellopython@ubuntu:/usr/bin$ pip3 freeze

Command 'pip3' not found, but can be installed with:

sudo apt install python3-pip

hellopython@ubuntu:/usr/bin$ sudo apt install python3-pip
hellopython@ubuntu:/usr/bin$ pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
hellopython@ubuntu:/usr/bin$ pip3 install selenium
Successfully installed selenium-3.141.0 urllib3-1.25.7

hellopython@ubuntu:/usr/bin$ pip3 show selenium
Name: selenium
Version: 3.141.0
Summary: Python bindings for Selenium
Home-page: https://github.com/SeleniumHQ/selenium/
Author: UNKNOWN
Author-email: UNKNOWN
License: Apache 2.0
Location: /home/hellopython/.local/lib/python3.6/site-packages
Requires: urllib3

hellopython@ubuntu:/usr/bin$ whereis python3
python3: /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python3 /usr/bin/python3.6-config /usr/bin/python3.6m-config /usr/lib/python3.6 /usr/lib/python3 /usr/lib/python3.7 /usr/lib/python3.8 /etc/python3.6 /etc/python3 /usr/local/lib/python3.6 /usr/include/python3.6 /usr/include/python3.6m /usr/share/python3 /usr/share/man/man1/python3.1.gz

hellopython@ubuntu:/usr/bin$ pip3 freeze
apturl==0.5.2
python-dateutil==2.6.1
python-debian==0.1.32
pytz==2018.3
pyxdg==0.25
PyYAML==3.12
reportlab==3.4.0
requests==2.18.4
requests-unixsocket==0.1.5
SecretStorage==2.3.1
selenium==3.141.0
.......
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值