linux系统安装了python中,但是为什么执行有问题
2023-09-27 14:21:42 时间
执行python命令 报错如下:nohup python -u py_write_excel.py >>nouhp2.out 2>&1 &
[analyse@host-192-168-1-24 batch]$ more nouhp2.out Traceback (most recent call last): File "py_write_excel.py", line 5, in <module> import cx_Oracle ImportError: No module named cx_Oracle Traceback (most recent call last): File "py_write_excel.py", line 5, in <module> import cx_Oracle ImportError: No module named cx_Oracle nohup: ignoring input Traceback (most recent call last): File "py_write_excel.py", line 5, in <module> import cx_Oracle ImportError: No module named cx_Oracle
原因是python,命令 是默认用的python2,python2中默认是没有
cx_Oracle这个模块的,,如果改成python3就可以执行了。因为python3中内置
cx_Oracle这个模块
相关文章
- python基础之常用的高阶函数
- linux Python-安装sasl包的错误
- Linux下如何后台执行Python程序
- 用conda创建python虚拟环境,linux系统,win10系统都可以,非常方便
- Python hasattr, getattr, modules判断模块属性是否存在
- Python:os.path.join()产生的斜杠在Windows和Linux下的不同表现和解决方法
- Linux集群和自动化维2.6 生产环境下的Shell和Python脚本分类
- 如何在 Linux 中安装最新的 Python 3.6 版本
- linux下如何编译python生成libpython2.5.so动态库
- 《Python和Pygame游戏开发指南》——1.5 Ubuntu和Linux上的安装说明
- Linux下安装OpenCV+Python支持
- Python 教程之如何使用 matplotlib 在 python 中绘制数学函数
- Linux-030-Python jupyter notebook 修改样式和字体调整
- Python基础之:Python中的异常和错误
- 【Jenkins自动化部署】Linux节点的Python服务自动化构建
- Linux—yum的python版本错误——初级解决方案
- 在linux下查看python已经安装的模块
- linux服务器定时执行python代码
- Linux - Ubuntu里安装Python的包