python3 环境和pip3搭建简单步骤
来源:互联网 发布:java图形界面插件 编辑:程序博客网 时间:2024/06/05 04:50
突然想起来学习一下python3的版本。。。 但是目前来说 正常的linux环境下都是python2的环境,今天就说说快速搭建python3和pip的环境。
1.安装epel
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
这个是一个强大的第三方源。可以安装很多软件,对于官方yum源的一个很强力的补充。
2.安装python3.4的环境
搜索下最新的python3的环境版本
yum search python3
(目前最新的是python34,后面命令以这个环境为例)
安装
yum install -y python34
目前python3的基本环境安装完了。
3.安装pip3的环境
yum install -y python34-pip.noarch python34-devel.x86_64
python34-devel.x86_64 是一个python3的开发环境,如果不安装的话部分的模块可能会出现如下的问题:
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=530 -DPSUTIL_LINUX=1 -I/usr/include/python3.4m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.4/psutil/_psutil_common.o psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1 ----------------------------------------Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-eh8jylh1/psutil/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-0m59u23h-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-eh8jylh1/psutil/
4.更新pip3的版本
pip3 install --upgrade pip
到目前位置,基本的python3环境算是搭建好了。
阅读全文
0 0
- python3 环境和pip3搭建简单步骤
- PyCharm、Python3和PyQt5环境搭建和简单使用
- [bigdata-068] centos 安装python3和pip3
- centos6.8 安装python3/pip3/sqlite3步骤详解
- Python3.4连接MySQL的环境搭建步骤
- 配置python3的pip3
- [mac]安装python3后使用pip和pip3的区别
- 在ubuntu16.04中安装python3.6.3和pip3.6
- centos7 搭建 python35+pip3+pytorch 深度学习环境
- python3.6+wampserver搭建简单CGI环境(Windows)
- 搭建python3环境
- python3环境搭建
- python3+selenium3 环境搭建
- windows10+python3环境搭建
- Python3+selenium3环境搭建
- Python3环境搭建
- Python3+selenium环境搭建
- 简单介绍一下android studio中网络请求方法的步骤和环境搭建
- Qt学习之旅---3.文件处理,小例子文本编辑器
- 解析自定义属性
- 排序练习1
- 链表的插入、修改、删除、遍历--java
- limit
- python3 环境和pip3搭建简单步骤
- HDU 6184&& 2017广西邀请赛 Counting Stars(三元环计数)
- Nodejs Express 4.X 中文API
- EA&UML日拱一卒-活动图::14.2 Behavior StateMachines(1)
- 基于阈值图像分割
- 今日头条2018 坐标
- transient、volatile关键字
- linux下 nginx由1.9.5升级到1.13.4
- 自定义view-onMeasure解析