简体   繁体   English

在Windows的python 3上安装斜纹的问题。

[英]Problems installing twill on python 3 on windows.

I'm trying to use pip to install twill. 我正在尝试使用pip安装斜纹布。 I do the following. 我执行以下操作。

C:\Users\mjpvanzuijlen\Python\python3.exe -m pip install twill

Which gives me the following result: 这给了我以下结果:

  Collecting twill
  Using cached https://files.pythonhosted.org/packages/2f/7e/ce3e6d72efe66530e131454f63c456b9f088435daaa99ae37b53ceafd32b/twill-1.8.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\MJPVAN~1\AppData\Local\Temp\pip-install-h1xg__n6\twill\setup.py", line 6
        print '(WARNING: importing distutils, not setuptools!)'
                                                              ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MJPVAN~1\AppData\Local\Temp\pip-install-h1xg__n6\twill\

I found some github posts saying that this might be caused by setupttools, and upgrading it should fix it. 我发现一些github帖子说这可能是由setupttools引起的,对其进行升级应该可以解决它。 I tried this, but it didn't work. 我试过了,但是没有用。

I'm not quite sure what's going wrong, but the print statement appears to be for python2? 我不太确定出了什么问题,但是print语句似乎适用于python2? Could it be that python3 is running a pip version running python2? 可能是python3运行的是运行python2的pip版本吗? I'm clueless. 我一无所知。

There is a different pip for python version3 python version3有一个不同的点

python3.exe -m pip install twill3

Try this 尝试这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM