ImportError: No module named 'nltk.tokenize'; 'nltk' is not a package

importerror: no module named mac
import urllib.error importerror: no module named error
importerror: no module named linux
no module named error python3
python no module named same directory
importerror: no module named py
python importerror no module named errors
importerror: no module named voluptuous

I am using python 3.5.2 within the pycharm IDE in windows 7, and I am having trouble importing the nltk package.

import nltk

gives the following error:

Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2.3\helpers\pydev\_pydev_bundle\", line 21, in do_import module = self._system_import(name, *args, **kwargs)
File "C:\Python\nltk", line 7, in <module> from nltk.tokenize import sent_tokenize, word_tokenize
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2016.2.3\helpers\pydev\_pydev_bundle\", line 21, in do_import module = self._system_import(name, *args, **kwargs)
ImportError: No module named 'nltk.tokenize'; 'nltk' is not a package

nltk seems to be properly installed. When i run the following in the terminal

pip install nltk

I get:

Requirement already satisfied (use --upgrade to upgrade): nltk in c:\users\leee\appdata\local\programs\python\python35-32\lib\site-packages

When I run PATH in the terminal, or sys.path in the python console,

C:\Users\leee\AppData\Local\Programs\Python\Python35-32\Lib\site-packages shows up within the long list. That is where all my other packages are installed, and other packages which are all importing properly.

I'm pretty confused right now, and all help is appreciated.

This usually happens because you have another file called Check your directory (C:\Python, where you are running this script) and remove or rename it if it's there. (I suppose the stray might be somewhere else on your PYTHONPATH too.)

ImportError: No module named 'XYZ', ImportError: No module named 'XYZ'. Jupyter notebook cannot find the package you already installed? Let's solve the problem. Our community has been nominated for a Webby Award for Best Community Website - thank you! Show the love and vote here.

With conda 4.5.4 MosesTokenizer has been moved out of NLTK due to licensing issues #306

now what you have to do is

pip install mosestokenizer

and replace

from nltk.tokenize.moses import MosesTokenizer, MosesDetokenizer


from mosestokenizer import MosesTokenizer, MosesDetokenizer

if you are using conda please note that moses is removed form there and now available at on PyPI

Python error “ImportError: No module named”, To get rid of this error you just need to create in the appropriate directory and everything will work fine. To know more about this you  In my case, because I'm using PyCharm and PyCharm create a 'venv' for every project in project folder, but it is only a mini env of python. Although you have installed the libraries you need in Python, but in your custom project 'venv', it is not available. This is the real reason of 'ImportError: No module named xxxxxx' occurred in PyCharm.

In pycharm, press on ctrl/cmd + shift + A, then type "Python Interpreter"

and make sure you have the same interpreter as the one your pip refers to (and not some Jetbrains default one)

Note: If you have both python 2.7 and python 3.x installed, the convention is that pip refers to the 2.x dist, and pip3 refers to 3.x

Traps for the Unwary in Python's Import System, This has changed in Python 3.3: now any directory on sys.path with a name that "<string>", line 1, in <module> ImportError: No module named ImportError: No module named jira" I'm calling the python file from a script task like the following "python" and then I supply the location to the in the working subdirectory field.

Thanks. It solved my problem.

Problem: I created a file "" and writing code in that file and try to execute it is giving the error 'ModuleNotFoundError: No module named 'nltk.tokenize'; 'nltk' is not a package'.

Solution: After that I renamed "" to some other then my problem got resolved.

ImportError: No module named error, import urllib.error ImportError: No module named error[/inline] Could this be a problem with something in the script, or my Python configuration,  I am getting this below error, when I tried to import boto3 module in my python code. >>> import boto3 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named boto3

ImportError: No module named github · Issue #856 · PyGithub , I'm trying to use PyGitHub and I'm getting "ImportError: No module named github". Setup specs: macOS v10.13.6 Python v3.7.0 Installed with  In some cases no "No module " can appear even on local files. In such cases you just need to mark appropriate directories as "source directories": The settings are changed for PyCharm 5+. At bottom of window, click + to install or - to uninstall.

ImportError: No module named 'fvcore' · Issue #11 , detectron2/detectron2/checkpoint/", line 3, in from fvcore.common.​file_io import PathHandler, PathManager ImportError: No  Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named PIL I've never had such problem, what do you think? python python-imaging-library easy-install

python script error: ImportError: No module named pysam, I have tried to resolve it by uninstalling and reinstalling pysam. Make sure you install pysam for the right python version. In your case, I suggest: python2.7 -m pip  ImportError: No module named mediatools #12. er-mao opened this issue Nov 13, 2017 · 7 comments Comments. Copy link Quote reply er-mao commented Nov 13, 2017.

  • I would also recommend to use virtualenv with PyCharm to isolate your project environments. I had an answer about that here:…
  • Thank you, this was the problem. I had a python file named where I was practicing using nltk.
  • Are the functions in mosestokenizer equivalent to sacremoses here which is the package discussed in the nltk issues on github.
  • If a version mismatch was the problem, the error would be ImportError: No module named 'nltk'.
  • This was not my particular problem, but I did not know that distinction could be made. Thank you