Problems installing twill on python 3 on windows.

1.2k Views Asked by At

I'm trying to use pip to install twill. 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. 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? Could it be that python3 is running a pip version running python2? I'm clueless.

1

There are 1 best solutions below

1
Nishabu On BEST ANSWER

There is a different pip for python version3

python3.exe -m pip install twill3

Try this