How can I install installation pattern packages in python 3.5?

How do I install installation pattern packages in python 3.5?

So far in CMD:

pip install pattern
syntaxerror: missing parentheses in call to 'print'

It shows an error:

messageCommand "python setup.py egg_info" failed with error 
      code 1 in temp\pip-build-3uegov4d\pattern

seabornand tweepywere successful.

How can I solve this problem?

+4
source share
4 answers

pip install pattern3 - Python 3.x

pip installation template - Python 2.7.x

+2
source

As you can see from the documentation, for python 3 the template is only supported in version 3.6 and higher. https://github.com/clips/pattern#installation

This helped me to get pattern.en working on python 3.6 :

git clone -b development https://github.com/clips/pattern
cd pattern
sudo python3.6 setup.py install

https://github.com/clips/pattern/issues/62

SSL mac (10.11.6), , python (3.6):

import nltk
import ssl 

try:
    _create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
    pass
else:
    ssl._create_default_https_context = _create_unverified_https_context

nltk.download('wordnet_ic')

, ssl , fwiw: fooobar.com/questions/265446/...

:

user@USDR00253 ~> python3.6
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from pattern.en import conjugate, lemma, lexeme, parse
>>>
>>> print(parse('ridden', relations=True, lemmata=True))
ridden/VBN/B-VP/O/O/ride
>>>

pattern.en, , python 3!

+2

- . python3.

, ( virtualenv) - ​​ -. https://github.com/clips/pattern/tree/development

, 2013 : https://github.com/clips/pattern/issues/62

, (readme , Python3 ). https://github.com/pattern3/pattern

, pip install pattern3, , , . "", , GenSim.

Python3 Gensim, , , , . ( mysql-, Mac. wordnet NTLK, SSL . , , try tree.py). !

, , (, 2018 ). , pattern3 "", Python3. , .

pip pattern ( 3, , , ), .

+1

python 2.x 3.x print , . , print "Hello world!", print("Hello world!"). , , 2.x, , 3.x, . ​​

: 2.x , 3.x.

0

Source: https://habr.com/ru/post/1625874/


All Articles