On OS X you could have multiple installation of Python, so investigate it first:
$ which python python2 python3 /usr/bin/python /usr/local/bin/python3 $ which pip pip2 pip3 /usr/local/bin/pip /usr/local/bin/pip2 /usr/local/bin/pip3
All within /usr/bin
are built-in and all other in /usr/local/bin
are external installed by Homebrew or some other package manager.
If you’re using pip
or pip3
from /usr/local
, then you’ve to use the same Python instance, otherwise they’re different instances.
Just install it via pip
:
pip install nltk
or for Python 3:
pip3 install nltk
then run the right Python instance from /usr/local/bin
or update your PATH
system variable.
Related Posts:
- pip or pip3 to install packages for Python 3?
- How to uninstall Python 2.7 on a Mac OS X 10.6.4?
- matplotlib: RuntimeError: Python is not installed as a framework
- boto3 python 2.7 ImportError: No module named boto3 USER_BASE USER_SITE site packages doesn’t exist
- How to install pip for Python 3 on Mac OS X?
- bash: pip: command not found
- bash: pip: command not found
- How to uninstall pip on OSX?
- ImportError: No module named pip
- ImportError: No module named pip
- How do I install pip on macOS or OS X?
- Pip freeze vs. pip list
- How do I install pip on macOS or OS X?
- How can I run python in terminal on a mac?
- Could not install packages due to an EnvironmentError:
- Could not find a version that satisfies the requirement tensorflow
- Could not find a version that satisfies the requirement tensorflow
- Updating Python on Mac
- How do I upgrade to Python 3.6 with conda?
- import opencv vs import cv2
- How to pip or easy_install tkinter on Windows
- How to change default Python version?
- ImportError: No module named sklearn (Python)
- bash: pip: command not found
- How to change default Python version?
- How do I install the yaml package for Python?
- What version of Python is on my Mac?
- ModuleNotFoundError: No module named ‘matplotlib’
- Checking whether pip is installed?
- How can I install a previous version of Python 3 in macOS using homebrew?
- Python: source code string cannot contain null bytes
- Could not install packages due to an EnvironmentError: [Errno 13]
- Kill a python process
- Spell Checker for Python
- Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later
- How do I install pip on macOS or OS X?
- Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew’s Python installed
- TypeError: ‘int’ object is not subscriptable
- How do I update\upgrade pip itself from inside my virtual environment?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to install pip with Python 3?
- ‘pip’ is not recognized as an internal or external command
- How to update/upgrade a package using pip?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to update/upgrade a package using pip?
- How to uninstall a package installed with pip install –user
- What is the result of % in Python?
- Reading an Excel file in python using pandas
- How can I install packages using pip according to the requirements.txt file from a local directory?
- Error: ‘int’ object is not subscriptable – Python
- How to uninstall Anaconda completely from macOS
- Python Variable Declaration
- How do I compare two strings in python?
- TypeError: ‘int’ object is not callable
- TypeError: ‘int’ object is not callable
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- working of \n in python [duplicate]
- How can I install pip on Windows?
- TypeError: ‘int’ object is not callable
- “pip install unroll”: “python setup.py egg_info” failed with error code 1
- ImportError: No module named tensorflow
- Cannot find module cv2 when using OpenCV
- Where is BeautifulSoup4 hiding?
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- Cannot find module cv2 when using OpenCV
- Python ‘If not’ syntax [duplicate]
- RuntimeWarning: invalid value encountered in divide
- Where to place $PATH variable assertions in zsh?
- Converting dictionary to JSON
- Enable OpenMP support in clang in Mac OS X (sierra & Mojave)
- ImportError: No module named pandas. Pandas installed pip
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS
- Where does pip install its packages?
- Could not install packages due to a “Environment error :[error 13]: permission denied : ‘usr/local/bin/f2py'”
- WinError 2 The system cannot find the file specified (Python)
- IndexError: tuple index out of range —– Python
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- Where does pip install its packages?
- How to install python3 version of package via pip on Ubuntu?
- TypeError: cannot perform reduce with flexible type
- How do I install a Python package with a .whl file?
- Xcode is not currently available from the Software Update server
- How to view / open a calculator in mac OS X?
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- pip/python: normal site-packages is not writeable
- “Defaulting to user installation because normal site-packages is not writeable” python message
- How do I install a Python package with a .whl file?
- Local variable referenced before assignment?
- re.sub erroring with “Expected string or bytes-like object”
- Xcode is not currently available from the Software Update server
- How to install pytorch in Anaconda with conda or pip?
- ln (Natural Log) in Python
- Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a topic branch
- ImportError: numpy.core.multiarray failed to import
- VirtualBox NS_ERROR_FAILURE (0x80004005) macOS
- Installing Homebrew on OS X
- “ssl module in Python is not available” when installing package with pip3
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory