3

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.

Mitchell van Zuylen
  • 3,905
  • 4
  • 27
  • 64
  • 1
    Possible duplicate of [Is there a new/updated Twill?](https://stackoverflow.com/questions/24055220/is-there-a-new-updated-twill) – hoefling Aug 15 '18 at 10:03

1 Answers1

4

There is a different pip for python version3

python3.exe -m pip install twill3

Try this

barbsan
  • 3,418
  • 11
  • 21
  • 28
Nishabu
  • 134
  • 1
  • 15
  • Thanks! worked for me. This seems to be outdated one. As the version of the original twill as of now is [1.8.0](https://pypi.org/project/twill/) while that of twill3 is only 0.11 – Akshay Kasar Jun 24 '19 at 20:53