linux安装python教程,linux中安装python详细步骤⼀、安装python
2.安装python
[root@localhost mnt]# tar -xvzf Python-2.
[root@localhost mnt]# cd Python-2.7.13
[root@localhost Python-2.7.13]# ./configure --prefix=/usr/local/python27
checking build x86_64-unknown-linux-gnu
checking host x86_64-unknown-linux-gnu
checking for -- no
checking for -- 32-bit
linux2
checking for -- no
checking no
checking nojava学生成绩管理系统课程设计
checking no
configure: error: in `/mnt/Python-2.7.10':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
如上,出错了,解决⽅法:安装gcc
配置好本地yum源后,安装gccjava编程语言之父
[root@pos.d]# yum install gcc
继续安装python
[root@localhost Python-2.7.10]# ./configure --prefix=/usr/local/python27
[root@localhost Python-2.7.10]# make && make install
参考⽂档
⼆、安装pip
pip下载地址
python安装教程mac安装pip
[root@localhost mnt]# tar -xvzf pip-7.1.
[root@localhost mnt]# cd pip-7.1.0
[root@localhost pip-7.1.0]# ls
< docs MANIFEST.in -info README.rst setup.py
< pip PKG-INFO setup.cfg
[root@localhost pip-7.1.0]# python setup.py install
.....
参考连接:
三、安装robotframework
robotframework下载地址:
安装robotframework
[root@localhost mnt]# chmod 777 robotframework-2.
[root@localhost mnt]# tar -xvzf robotframework-2.
[root@localhost mnt]# cd robotframework-2.9
[root@localhost robotframework-2.9]# python setup.py install
……
查看是否安装成功
[root@localhost robotframework-2.9]# pybot --version
Robot Framework 2.9 (Python 2.6.6 on linux2)
[root@localhost robotframework-2.9]#
参考连接:
问题:robotframework都安装到哪⾥了?
[root@localhost robotframework-2.9]# find / -name robot
/usr/lib/python2.6/site-packages/robotframework-2./robot
/mnt/robotframework-2.9/src/robot
/mnt/robotframework-2.9/build/lib/robot
四、安装robotframework-selenium2library
robotframework-selenium2library下载地址
[root@localhost mnt]# chmod 755 robotframework-selenium2library-1.7. [root@localhost mnt]# tar -xvzf robotframework-selenium2library-1.7. [root@localhost mnt]# cd robotframework-selenium2library-1.7.3
[root@localhost robotframework-selenium2library-1.7.3]# python setup.py install error: MD5 validation failed for docutils-0.; possible download problem?出错了,咋办?解决⽅法:按提⽰,下载并安装docutils
docutils下载地址
1.安装docutils
[root@localhost mnt]# chmod 755 docutils-0.
[root@localhost mnt]# tar -xvzf docutils-0.
[root@localhost docutils-0.12]# python setup.py install
继续安装robotframework-selenium2library
[root@localhost mnt] cd robotframework-selenium2library-1.7.3
[root@localhost robotframework-selenium2library-1.7.3]# python setup.py install ……
/usr/lib/python2.6/site-packages/robotframework_selenium2library-1.7. Processing dependencies for robotframework-selenium2library==1.7.3
Searching for selenium>=2.32.0
到这⾥可能是⽹络原因,⼜卡住了,解决⽅法:
2.下载并安装selenium
selenium下载地址
安装selenium
[root@localhost mnt]# tar -xvzf selenium-2.47.
[root@localhost mnt]# cd selenium-2.47.1
[root@localhost selenium-2.47.1]# python setup.py install
3.继续安装robotframework-selenium2library
[root@localhost mnt]# cd robotframework-selenium2library-1.7.3
[root@localhost robotframework-selenium2library-1.7.3]# ls
build demo README.rst setup.py
BUILD.rst dist MANIFEST.in selenium.bmp src
CHANGES.rst doc PKG-INFO
< INSTALL.rst README setup.cfg
[root@localhost robotframework-selenium2library-1.7.3]# python setup.py install ……
Using /usr/lib/python2.6/site-packages/selenium-2.47.
Finished processing dependencies for robotframework-selenium2library==1.7.3
朋友回复null什么意思4.检测Selenium2Library是否安装成功
[root@localhost robotframework-selenium2library-1.7.3]# python
Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Selenium2Library
>>>
在安装过程中出现如下错误:
ImportError: No module named setuptools
[root@localhost MySQL-python-1.2.5]# python setup.py install Traceback (most recent call last):
File "setup.py", line 7, in
import setuptools
ImportError: No module named setuptools
字⾯意思是:没有setuptools的模块,说明python缺少这个模块;
解决⽅法如下:
下载setuptools包
解压setuptools包
# tar -xvf setuptools-0.
# cd setuptools-0.6c11
编译setuptools
# python setup.py build
开始执⾏setuptools安装
# python setup.py install
安装完成;
Python错误:No module named setuptools解决⽅法
在安装过程中出现如下错误:
js是什么意思服务[root@localhost MySQL-python-1.2.5]# python setup.py install Traceback (most recent call last):
File "setup.py", line 7, in
import setuptools
ImportError: No module named setuptools
字⾯意思是:没有setuptools的模块,说明python缺少这个模块;
解决⽅法如下:
下载setuptools包
解压setuptools包
# tar -xvf setuptools-0.
# cd setuptools-0.6c11
element ui tree源码编译setuptools
# python setup.py build
开始执⾏setuptools安装
# python setup.py install
安装完成;
Linux下安装oracle
1.确认oracle-instantclient的basic、sqlplus、devel是否已按照成功
2./etc/profile中是否配置正确(类似下列指令)
ORACLE_HOME="/usr/lib/oracle/12.1/client64"
PATH=$PATH:$ORACLE_HOME/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH
特别是export PATH(这⼀句不能少)
3.使⽤sudo权限安装cx_Oracle
如果实在不⾏,可去官⽹下载源码,⾃⾏编译安装
下载linux oracle
cc:zhengjialiang@htsc,b
安装路径/usr/lib/oracle
6)创建相关⽤户和组,作为软件安装和⽀持组的拥有者。
创建Oracle⽤户和密码,输⼊命令:
1
2
3
useradd -g oinstall -g dba -m oracle
passwd oracle
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论