首页 > 解决方案 > python模块安装期间的语法错误

问题描述

我想安装 ClientForm 这是 python 模块,但在安装过程中出现此错误,有人可以帮助我吗?

python -m pip install ClientForm
Collecting ClientForm
  Using cached ClientForm-0.2.10.tar.gz (104 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\paulo\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\paulo\\AppData\\Local\\Temp\\pip-install-tava6mrg\\clientform\\setup.py'"'"'; __file__='"'"'C:\\Users\\paulo\\AppData\\Local\\Temp\\pip-install-tava6mrg\\clientform\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\paulo\AppData\Local\Temp\pip-pip-egg-info-s3ag4apt'
         cwd: C:\Users\paulo\AppData\Local\Temp\pip-install-tava6mrg\clientform\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\paulo\AppData\Local\Temp\pip-install-tava6mrg\clientform\setup.py", line 13
        False, True = 0, 1
        ^
    SyntaxError: cannot assign to False
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

标签: pythonpython-3.x

解决方案


ClientForm最后一次发布是在 2008年,与第一个 Python 3.0 版本同一天。它的作者认为它被放弃了,转而使用mechanize包。

它与您尝试安装它的 Python 3 版本不兼容。

查看机械化包。


推荐阅读