问题描述
- 安装python setuptools出错
-
python ez_setup.py
安装setuptools出错:
提示如下:
Traceback (most recent call last):
File "setup.py", line 169, in
dist = setuptools.setup(**setup_params)
File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
setup_distribution = dist = klass(attrs)
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/setuptools/dist.py", line 272, in __init_
Distribution._init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in init
self.finalize_options()
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/setuptools/dist.py", line 326, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/__init__.py", line 2385, in require
reqs = self.dist.requires(self.extras)
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/__init__.py", line 2617, in requires
dm = self._dep_map
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/__init__.py", line 2606, in dep_map
if invalid_marker(marker):
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/_init__.py", line 1424, in is_invalid_marker
cls.evaluate_marker(text)
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/__init__.py", line 1549, in markerlib_evaluate
env = cls._translate_metadata2(_markerlib.default_environment())
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/_init__.py", line 1537, in translate_metadata2
for key, value in env
File "/home/huangay/samba/trunkcode/sita_trunk/core/tplayer/src/package/apps/drm_plugin/3rds/widevine/3rds/setuptools/setuptools-18.5/pkg_resources/_init__.py", line 1536, in
(key.replace('.', '_'), value)
ValueError: too many values to unpack大神们帮忙分析分析啊
解决方案
问题已解决:
原因也说下:
是因为系统自带python所在的目录用户无权限修改;而用python安装setuptools是自动安装到python安装目录下的,而该目录不允许修改而导致问题;
解决办法:
一、申请权限;
二、安装一个自己的python,使用自己的python安装setuptools;
解决方案二:
bash-3.0# python setup.py build
Traceback (most recent call last):
??File "setup.py", line 5, in <module>
? ? from setuptools import setup, Extension
ImportEr......
答案就在这里:python 安装setuptools出错
----------------------
解决方案三:
单纯这样看,基本看不出来的,你是怎么安装的? 我记得要bulid或者install这样的参数啊
时间: 2025-01-02 20:48:36