Pandas 环境安装

有Anaconda软件包,集成了所有的大数据分析包,就没有必要一个个去安装了。

1. 在Liunx下 wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh, 

2.. 下载完成后#bash Anaconda3-5.0.1-Linux-x86_64.sh,  一路next下去就可以了。

3. 安装完成后通过#conda list可以看到pandas, numpy 都已经安装了

配置启动jupyter notebook

1. 生成配置文件

[root@8734d9814dd1 /]# jupyter notebook --generate-config --allow-root
Writing default config to: /root/.jupyter/jupyter_notebook_config.py
2. 生成密码, 把sha1........密码复制下来

[root@8734d9814dd1 /]# ipython
Python 3.6.3 |Anaconda, Inc.| (default, Oct 13 2017, 12:02:49) 
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password: 
Verify password: 
Out[2]: 'sha1:271c5018c082:78b4415f711d0ab50085c02cb379641645ae7295'
3. 修改配置文件

vi /root/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha:ce...'
c.NotebookApp.open_browser = False
c.NotebookApp.port =8889
4. 启动jupyter notebook

root@8734d9814dd1 /]# jupyter notebook --allow-root
[W 13:28:48.965 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 13:28:48.991 NotebookApp] JupyterLab alpha preview extension loaded from /usr/local/anaconda3/lib/python3.6/site-packages/jupyterlab
JupyterLab v0.27.0
Known labextensions:
[I 13:28:48.992 NotebookApp] Running the core application with no additional extensions or settings
[I 13:28:48.994 NotebookApp] Serving notebooks from local directory: /
[I 13:28:48.994 NotebookApp] 0 active kernels 
[I 13:28:48.994 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8889/
[I 13:28:48.994 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

通过浏览器访问http://your ip:8889/ 即可



### 安装 Pandas 库的方法 要在 Visual Studio Code (VSCode) 的 Python 环境安装 `pandas` 库,可以按照以下方法操作: #### 方法一:通过终端命令安装 在 VSCode 中打开一个新的集成终端窗口。可以通过菜单栏中的 **View > Terminal** 或者快捷键 `Ctrl+\` 打开终端[^3]。接着,在终端中输入以下命令来安装 `pandas` 库: ```bash pip install pandas ``` 如果当前环境中存在多个版本的 Python,则可能需要指定具体使用的 Python 版本对应的 pip 工具。例如: ```bash python -m pip install pandas ``` #### 方法二:利用 Jupyter Notebook 或交互式窗口 对于某些项目需求,可以直接在支持 IPython 的环境下执行安装指令。这通常适用于使用 Jupyter Notebooks 或其他类似的交互工具时。可以在代码单元格中运行如下魔法函数[^2]: ```python !pip install pandas ``` #### 验证安装成功与否 完成上述任一步骤之后,为了确认 `pandas` 是否被正确安装到目标 Python 解释器上,可尝试导入该模块并打印其版本号作为验证手段之一: ```python import pandas as pd print(pd.__version__) ``` 如果没有报错且能够正常显示版本信息,则说明安装无误。 #### 注意事项 确保所选的工作区已关联至正确的虚拟环境或者全局解释器设置;否则可能会导致依赖项无法加载等问题发生。另外还需注意权限管理方面的情况——当遇到 Permission denied 错误提示时考虑加上 --user 参数重新执行一次安装过程即可解决此类情况下的大部分难题[^1]. ```python pip install --user pandas ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值