LING 388: Computers and Language

[Pages:23]LING 388: Computers and Language

Lecture 16

Administrivia

? Homework 9:

? install nltk and nltk_data on your laptops



Platforms

? Today I'll go through installation for:

1. MacOS (and Linux) 2. Windows 10

? Your homework assignment:

? install nltk, and ? check to see if it works (by next time)

? In the next few lectures:

?

NLTK 3.4.5 Install

? NLTK requires Python versions 2.7, 3.5, 3.6, or 3.7

? See

ml

? Use pip3 (for python3) to install packages from the Python Package Index (PyPI)

(sudo ? means execute the pip3 command with admin privilege)

sudo pip3 install -U nltk

NLTK Data Install

? See

? python3

? If you get an SSL certificate error message, run:

/Applications/Python 3.6/Install mand

NLTK Data Install (WARNING!)

? Don't use the built-in Python 3 from MacOS Catalina

? No more GUI!

? Also throws a SSL: CERTIFICATE_VERIFY _FAILED error

NLTK Data Install: SSL: CERTIFICATE_VERIFY_FAILED

? Workaround:

~$ /usr/bin/sudo /bin/mkdir /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc ~$ /usr/bin/python3 -c 'import ssl; print(ssl.get_default_verify_paths())' DefaultVerifyPaths(cafile=None, capath=None, openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ssl/certs') ~$ /usr/bin/sudo /bin/ln -s /etc/ssl/ /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ ~$ /usr/bin/python3 -c 'import ssl; print(ssl.get_default_verify_paths())' DefaultVerifyPaths(cafile='/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ssl/ cert.pem', capath='/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ssl/certs', openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ssl/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/etc/ssl/certs') ~$ which python3 /usr/bin/python3 ~$ which pip3 /usr/bin/pip3

? Details:

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download