全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2927|回复: 9

[翻译] 安装宝塔报错,python环境感觉有问题(已解决,重装系统...

[复制链接]
发表于 2018-9-2 10:17:15 | 显示全部楼层 |阅读模式
本帖最后由 0Ll0 于 2018-9-11 15:41 编辑

安装宝塔时报错,Xen架构,系统是debain7,python2.5还是2.6,我安装了python3.5(之前跑不了逗比大佬的脚本,安装了,查看流量那里会报错。。。)不想重装系统,换内核要发工单
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    from web import version
  File "/root/web.py-0.38/web/__init__.py", line 14, in <module>
    import utils, db, net, wsgi, http, webapi, httpserver, debugerror
ImportError: No module named 'utils'
发表于 2018-9-2 10:29:49 | 显示全部楼层
宝塔有专门的论坛
https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=9291
发表于 2018-9-2 10:33:27 | 显示全部楼层
notmya 发表于 2018-9-2 10:29
宝塔有专门的论坛
https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=9291

扎心了,这里是万能的
 楼主| 发表于 2018-9-2 10:36:14 | 显示全部楼层
notmya 发表于 2018-9-2 10:29
宝塔有专门的论坛
https://www.bt.cn/bbs/forum.php?mod=viewthread&tid=9291

跑大佬的脚本也会报错
Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 28, in <module>
    import apt_pkg
ImportError: No module named 'apt_pkg'
Setting up python-imaging (1.1.7-4+deb7u3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing python-imaging (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up python2.6-minimal (2.6.8-1.1+deb7u1) ...
Linking and byte-compiling packages for runtime python2.6...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing python2.6-minimal (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python2.6:
python2.6 depends on python2.6-minimal (= 2.6.8-1.1+deb7u1); however:
  Package python2.6-minimal is not configured yet.

dpkg: error processing python2.6 (--configure):
dependency problems - leaving unconfigured
Setting up python-pkg-resources (0.6.24-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing python-pkg-resources (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-setuptools:
python-setuptools
循环出错
发表于 2018-9-2 10:41:11 | 显示全部楼层
那就再跑一遍试试
发表于 2018-9-2 10:42:41 | 显示全部楼层
装宝塔,我一般都用centos,莫名其妙的错误,就会少很多。
 楼主| 发表于 2018-9-2 10:53:19 | 显示全部楼层
hejiaqiao 发表于 2018-9-2 10:41
那就再跑一遍试试

Collecting web.py
  Using cached https://files.pythonhosted.org/packages/fc/58/21649fc1849b1f688f3d42e25e79615cc573469ea57eaa9e6af70b1e3b87/web.py-0.39.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-s9ru88ra/web.py/setup.py", line 6, in <module>
        from web import __version__
      File "/tmp/pip-build-s9ru88ra/web.py/web/__init__.py", line 14, in <module>
        import utils, db, net, wsgi, http, webapi, httpserver, debugerror
    ImportError: No module named 'utils'
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-s9ru88ra/web.py
You are using pip version 7.1.2, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
发表于 2018-9-2 10:55:33 | 显示全部楼层
感觉是python3覆盖了系统内置的python2,导致一系列依赖用不了,比如apt?
发表于 2018-9-2 11:10:47 来自手机 | 显示全部楼层
宝塔5.x不是依赖于python2.7吗?
 楼主| 发表于 2018-9-2 13:56:52 | 显示全部楼层
到最后还是重装系统了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-29 21:59 , Processed in 0.066135 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表