fme报错no module name pypdf2

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了fme报错no module name pypdf2相关的知识,希望对你有一定的参考价值。

参考技术A 笔者实操时遇到“ModuleNotFoundError: No module named ‘numpy’”报错,查询了一下有的是通过cmd使用pip安装numpy库,但经个人测试,没有成功。后经查询和测试可在PyCharm中直接安装numpy库(可能是3.X的版本特性)。第一步:点击preferences第二步:点击Project目录下的

No module named yum 报错

今天在测试服务器用yum的时候报错了: 

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It‘s possible that the above module doesn‘t match the
current version of Python, which is:
2.7.6 (default, Sep 29 2018, 18:12:27)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq

技术图片

这是因为升级python后, 没有指定yum用系统自带python版本导致的. yum和Python有依赖关系,yum是python的模块. 

[[email protected] ~]# python -V     # 果然是有人升级版本了, centos 6 默认是2.6的
Python 2.7.6
[[email protected]-A ~]# which python
/usr/local/bin/python
[[email protected]-A ~]# ll /usr/local/bin/python
lrwxrwxrwx 1 root root 7 Sep 29 18:13 /usr/local/bin/python -> python2
[[email protected]-A ~]# ll /usr/local/bin/python2
lrwxrwxrwx 1 root root 9 Sep 29 18:13 /usr/local/bin/python2 -> python2.7
[[email protected]-A ~]# which python2.6
/usr/bin/python2.6
[[email protected]-A ~]# 
[[email protected] ~]# vim /usr/bin/yum  ###修改这个文件, 把第一行 #!/usr/bin/python 改为 #!/usr/bin/python2.6
#!/usr/bin/python2.6

看这样就好了, 升级Python我之前也写过, 可以参考一下

技术图片

 

以上是关于fme报错no module name pypdf2的主要内容,如果未能解决你的问题,请参考以下文章

No module named yum 报错

python 运行报错 no module named configparser

python 3.x报错:No module named 'cookielib'或No module named 'urllib2'

Python报错No module named 'cv2'

python的卸载方式和运行yum报错:No module named yum

mac 上python编译报错No module named MySQLdb