0

enter image description hereAs you can see in the image, in the Pycharm, some codes are not light on... lilke line2 or line 5 , etc.

line 2 import sys

line 5 import csv

Do you know the reason?

# Need this for language determination
import sys

# Need this for reading csv file
import csv

# Need this for converting all texts into lowercase
import re

# Need this for tokenization
from nltk import wordpunct_tokenize
from nltk.corpus import stopwords
import nltk
Genie
  • 41
  • 6

1 Answers1

0

You have to install some packages before you import them. Try with:

pip install os-sys

And so on with the other python packages.

Ruggero
  • 427
  • 2
  • 10
  • Oh! Thanks a lot! However, it worked at the JupyterNote so I thought sys installed already. Is it possible that sys is not working in Pycharm even it is working in JupyterNote? – Genie Oct 27 '21 at 08:01
  • If it's installed, it would work anywhere. Try to check your interpreter inside the PyCharm settings. It will show you every package installed for that interpreter. – Ruggero Oct 27 '21 at 08:21