3

Am trying to install pattern on python 3.6 with the command prompt using:

pip3 install pattern

But am getting this error :

C:\WINDOWS\system32>pip3 install pattern
Collecting pattern
  Using cached pattern-2.6.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\HP\AppData\Local\Temp\pip-build-u_5lhmfa\pattern\setup.py", line 40
        print n
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int n)?

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\HP\AppData\Local\Temp\pip-build-u_5lhmfa\pattern\

By the way I have Python 2.7 installed as well and when I installed with pip2 install pattern, it perfectly installed.

The problem is with python 3.6. How can I fix this?

Ran
  • 635
  • 2
  • 10
  • 22

3 Answers3

3

Pattern-2.6 at PyPI seems to be rather old (last updated in 2014). They require Python 2.5+. I think the code is Python2-only, you cannot use it with Python 3.

Pattern3 seems to be the package for Python 3:

pip install pattern3
phd
  • 82,685
  • 13
  • 120
  • 165
1

I don't know how but this really worked for me:

Running command prompt as an administrator then :

pip3 install git+https://github.com/clips/pattern@development

This install pattern as more packages.

Am posting this in case it would help anyone

More details :["pattern" package for python 3.6 Anaconda ]

Ran
  • 635
  • 2
  • 10
  • 22
  • Development branch: 411 commits ahead of master. It seems they've updated the code for Python 3. – phd Dec 30 '17 at 22:49
0

Python3 support is as discussed in this issue: https://github.com/clips/pattern

From pip install from git repo branch

pip install -U https://github.com/clips/pattern/archive/development.zip
alvas
  • 115,346
  • 109
  • 446
  • 738