首页 > 其他分享 >Kali 下安装pip

Kali 下安装pip

时间:2023-06-17 19:13:32浏览次数:41  
标签:bootstrap pypa get Kali py io pip 安装

一、Kali 下安装pip3

1.1 方法一

sudo apt-get install python3-pip

1.2 方法二

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py

二、Kali 下安装pip2

2.1 前言

由于python 推广3 版本,同时Kali 作为非常激进的系统,所以就砍掉了python 2 版本的pip 命令。但是由于很多工具使用python2 编写的,需要使用pip2 下载相关依赖模块,就有了篇文章。

2.2 安装过程

 首先,去bootstrap.pypa.io 下载对应python 版本的pip。我的是pip-2.7.py 。

┌──(ajest AJESTdeKALI)-[~]
└─$ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py                                                  
--2021-08-09 11:47:44--  https://bootstrap.pypa.io/pip/2.7/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.228.175, 2a04:4e42:11::175
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.228.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1908226 (1.8M) [text/x-python]
Saving to: ‘get-pip.py’

get-pip.py                 100%[=======================================>]   1.82M  1.33MB/s    in 1.4s    

2021-08-09 11:47:55 (1.33 MB/s) - ‘get-pip.py’ saved [1908226/1908226]
                                                                                                           
┌──(ajest AJESTdeKALI)-[~]
└─$ ls
01CTFer  Documents  Edraw       Music     Public  Templates  Videos
Desktop  Downloads  get-pip.py  Pictures  share   tools      vulhub
                                                                                                           
┌──(ajest AJESTdeKALI)-[~]
└─$ mv get-pip.py get-2.7-pip.py               

┌──(ajest AJESTdeKALI)-[~]
└─$ python get-2.7-pip.py                  
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting pip<21.0
  Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 730 kB/s 
Collecting wheel
  Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Installing collected packages: pip, wheel
  WARNING: The scripts pip, pip2 and pip2.7 are installed in '/home/ajest/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script wheel is installed in '/home/ajest/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.3.4 wheel-0.36.2
                                                                                                           
┌──(ajest AJESTdeKALI)-[~]
└─$ 

2.3 可能遇到的问题

问题一:error: invalid command 'egg_info'

pip install --upgrade setuptools

2.4 安装pip3过程

py007@kali:~$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
8 2518k 8 208k 0 0 12221 0 0:03:30 0:00:17 0:03:13 16296
100 2518k 100 2518k 0 0 12806 0 0:03:21 0:03:21 --:--:-- 15425
py007@kali:~$

py007@kali:~$ sudo python3 get-pip.py
Collecting pip
Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 12.7 kB/s eta 0:00:00
Collecting wheel
Downloading wheel-0.40.0-py3-none-any.whl (64 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.5/64.5 kB 10.2 kB/s eta 0:00:00
Installing collected packages: wheel, pip
Successfully installed pip-23.1.2 wheel-0.40.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

标签:bootstrap,pypa,get,Kali,py,io,pip,安装
From: https://www.cnblogs.com/cmt110/p/17488057.html

相关文章

  • sourceTree下载安装以及使用
    下载官网1.滑动到官网最底下找到Downloadarchive (所有版本) 2.windows电脑就下windows的版本(mac系统同理),下载3.4.13就开始下软件了  3.开始安装---一直点下一步就OK啦 具体使用:1.点击+或者暂存所有,实际上是执行了gitaddREADME.md命令:2.点击提交就完成了......
  • delve安装及使用
    安装Clonethegitrepositoryandbuild:$gitclonehttps://github.com/go-delve/delve$cddelve$goinstallgithub.com/go-delve/delve/cmd/dlvAlternatively,onGoversion1.16orlater:#Installthelatestrelease:$goinstallgithub.com/go-......
  • wsl 安装的Ubuntu 和windows 里面的文件如何共享
    原文:oucanalsoaccessyourlocalmachine’sfilesystemfromwithintheLinuxBashshell–you’llfindyourlocaldrivesmountedunderthe /mnt folder.Forexample,your C: driveismountedunder /mnt/c:意思就是直接在Ubuntu里面cd到/mnt/c就可以了......
  • macOS 安装 postgreSQL
    PostgreSQLDocumentationbrewinstallpostgresqlbrewservicesstartpostgresqlcreatedb#Bydefault,adatabasewiththesamenameasthecurrentuseriscreated.#dropdbpsql......
  • 06. centos7使用docker方式安装gitlab
    gitlab初体验,使用docker进行快速安装,遇到了端口修改不生效的问题,在此记录一下。在正式环境中,gitlab的容器版,应该使用postgresql,redis,gitlab三个组件,使用标准的80端口,提供稳定且有性能的企业服务。但如果是在测试环境,或是想在一个机器上运行多个服务,则gitlab不一定能......
  •  SourceTree安装说明
    SourceTree安装之后需要使用账号登陆以授权,以前是可以不登陆的,但是现在是强制登陆。虽然是免费授权,但是碰上不可抗力因素,登陆不是很方便,这里记录一下跳过这个初始化的步骤。先运行一次安装包,出现需要登录的窗口后退出。此时桌面上就以出现快捷方式,不需要再使用安装文件了。安装之......
  • Stata计量统计下载STATA软件下载Stata绿色安装版 软件大全
    Stata是一款集数据分析、数据管理以及绘制专业图表的整合性统计软件,它提供许许多多功能,包括线性混合模型、均衡重复反复及多项式普罗比模式,用Stata绘制的统计图形相当精美。【功能特点】统计功能:Stata的统计功能很强,除了传统的统计分析方法外,还收集了近20年发展起来的新方法,如Cox比......
  • 通过安装GVM 安装GO 操作步骤
    转载请注明出处:1.GVMGVM是GoVersionManager的缩写,是一个用于管理Go语言版本的工具。通过GVM,我们可以轻松地安装、切换和卸载不同版本的Go语言。GVM会在用户的home目录下创建一个名为.gvm的隐藏文件夹,其中包含已安装的Go版本和相关的配置文件。通过GVM安装Go的......
  • linux环境安装docker
    卸载Dockeryumremovedocker\docker-client\docker-client-latest\docker-common\docker-latest\docker-latest-logrotate\docker-logrotate......
  • 05. centos7安装git服务
    1、安装编译git时需要的包yuminstall-ycurl-develexpat-develgettext-developenssl-develzlib-develyuminstall-ygccperl-ExtUtils-MakeMaker2、删除已有的gityumremovegit3、Git官网下载Git最新版tar包,地址wget安装:yuminstallwget-ycd/hom......