Python离线断网情况下安装numpy、pandas
本文最后更新于 1744 天前,其中的信息可能已经有所发展或是发生改变。

Python离线断网情况下安装numpy、pandas

联网情况下在命令终端CMD中输入pip install numpy即可自动安装,pandas和matplotlib同理一样方法进行自动安装。

但是呢,集团服务器都是不通外网的.因为pip是行不通只能通过离线安装(今天一位同事折腾一天都没部署上去..只能这边写个教程告诉他们了…)

PS : 环境服务器上已经安装了Python

1、输入python命令查看本地Python版本。

python -V

(base) [python_dev@mdw60 ~]$ python -V
Python 3.8.5

可以看到服务器中的Python版本是3.8.5

且检查一下服务器系统版本及其位数

uname -acat /etc/redhat-release

(base) [python_dev@mdw60 ~]$ uname -a
Linux mdw60 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
(base) [python_dev@mdw60 ~]$ cat /etc/redhat-release 
CentOS Linux release 7.5.1804 (Core) 
(base) [python_dev@mdw60 ~]$ 

可以看出系统是Centos 7.5 + 64位

2.开始离线安装numpy、pandas

这在着下载:https://www.lfd.uci.edu/~gohlke/pythonlibs/#pandas

或者fq了的可以在这查询下载:https://pypi.org/project (推荐使用这个…)

安装顺序:

安装Pandas所需的包有:numpy, dateutil, pytz, setuptools,这些也都需要下载。

其中安装python_dateutil还需要提前安装six包:

  1. numpy
  2. pytz
  3. setuptools
  4. six
  5. python_dateutil
  6. pandas

清单如下:

numpy-1.21.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
pandas-1.3.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
python_dateutil-2.8.2-py2.py3-none-any.whl
pytz-2021.3.tar.gz
setuptools-58.5.3.tar.gz
six-1.16.0.tar.gz

image-20211109183602539

3.测试是否安装成功:

使用pip list查看列表:

(base) [python_dev@mdw60 pandas]$ pip list
Package                Version
---------------------- -------------------
bcrypt                 3.2.0
brotlipy               0.7.0
certifi                2020.6.20
cffi                   1.14.3
chardet                3.0.4
conda                  4.9.2
conda-package-handling 1.7.2
cryptography           3.2.1
idna                   2.10
numpy                  1.21.4
pandas                 1.3.4
paramiko               2.7.2
pip                    20.2.4
prettytable            2.1.0
psycopg2-binary        2.8.6
pycosat                0.6.3
pycparser              2.20
PyMySQL                1.0.2
PyNaCl                 1.4.0
pyOpenSSL              19.1.0
PySocks                1.7.1
python-dateutil        2.8.2
pytz                   2021.3
requests               2.22.0
ruamel-yaml            0.15.87
setuptools             50.3.1.post20201107
six                    1.15.0
tqdm                   4.51.0
urllib3                1.25.11
wcwidth                0.2.5
wheel                  0.35.1
(base) [python_dev@mdw60 pandas]$ 

或者启动python:python

import pandas as pds

没提示出错,安装成功,如:

(base) [python_dev@mdw60 pandas]$ python 
Python 3.8.5 (default, Sep  4 2020, 07:30:14) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pds
>>> 
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇