Python安装setuptools遇到的MARKER_EXPR错误

简介: # python setup.py install Traceback (most recent call last):   File "setup.py", line 11, in     import setuptools   File "/home/zhangsan/setuptools-34.
# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 11, in
    import setuptools
  File "/home/zhangsan/setuptools-34.4.1/setuptools/__init__.py", line 12, in
    import setuptools.version
  File "/home/zhangsan/setuptools-34.4.1/setuptools/version.py", line 1, in
    import pkg_resources
  File "/home/zhangsan/setuptools-34.4.1/pkg_resources/__init__.py", line 72, in
    import packaging.requirements
  File "/usr/local/lib/python2.7/site-packages/packaging/requirements.py", line 59, in
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)


对于这个错误,只需要提示找到requirements.py的59行,将
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
改成:
MARKER_EXPR = originalTextFor(MARKER_EXPR)("marker")
即可。

如果在安装psycopg2遇到错误:
Error: pg_config executable not found.

则表示需要安装包postgresql-devel:
yum install postgresql-devel
相关文章
|
7天前
|
Linux 网络安全 Python
linux centos上安装python3.11.x详细完整教程
这篇文章提供了在CentOS系统上安装Python 3.11.x版本的详细步骤,包括下载、解压、安装依赖、编译配置、解决常见错误以及版本验证。
56 1
linux centos上安装python3.11.x详细完整教程
|
14天前
|
项目管理 Python
如何在Mac上安装多个Python环境
在你的Mac上使用多个Python环境可以对项目管理很有帮助,特别是在同时处理不同Python版本或不同的包需求时。在这篇文章中,我们将向你展示如何在Mac上轻松地安装和管理多个Python环境。
22 5
 如何在Mac上安装多个Python环境
|
7天前
|
NoSQL Linux Redis
linux安装单机版redis详细步骤,及python连接redis案例
这篇文章提供了在Linux系统中安装单机版Redis的详细步骤,并展示了如何配置Redis为systemctl启动,以及使用Python连接Redis进行数据操作的案例。
19 2
|
7天前
|
Linux 编译器 开发工具
快速在linux上配置python3.x的环境以及可能报错的解决方案(python其它版本可同样方式安装)
这篇文章介绍了在Linux系统上配置Python 3.x环境的步骤,包括安装系统依赖、下载和解压Python源码、编译安装、修改环境变量,以及常见安装错误的解决方案。
18 1
|
4天前
|
机器学习/深度学习 Linux 开发者
Python必备工具:pip的安装与管理
Python必备工具:pip的安装与管理
11 0
|
5天前
|
Python
7-14|salt之安装Python模块
7-14|salt之安装Python模块
|
5天前
|
Python
7-9|Python如何安装ruamel.yaml
7-9|Python如何安装ruamel.yaml
|
6天前
|
Python Windows
安装python 以及 安装 pycharm
安装python 以及 安装 pycharm
|
7天前
|
Linux Python
Linux之centos安装clinkhouse以及python如何连接
Linux之centos安装clinkhouse以及python如何连接
|
7天前
|
Linux Python
linux之安装python3
linux之安装python3