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
- How to update/upgrade a package using pip?
- How do I update\upgrade pip itself from inside my virtual environment?
- How to uninstall a package installed with pip install –user
- How to uninstall Anaconda completely from macOS
- working of \n in python [duplicate]
- Cannot find module cv2 when using OpenCV
- Where to place $PATH variable assertions in zsh?
- How to install python3 version of package via pip on Ubuntu?
- 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
- Configuring so that pip install can work from github
- socket.error: [Errno 48] Address already in use
- Terminal error: zsh: permission denied: ./startup.sh
- OS X: equivalent of Linux’s wget
- python socket.error: [Errno 98] Address already in use
- How to install PIP on Python 3.6?
- How do you update Xcode on OSX to the latest version?
- No module named pkg_resources
- What is the purpose of “pip install –user …”?
- How to upgrade all Python packages with pip
- How do I remove all packages installed by PIP?
- How to uninstall Docker completely from a Mac?
- ‘pip3’ is not recognized as an internal or external command, operable program or batch file
- AttributeError: Module Pip has no attribute ‘main’
- from PIL import Image – ImportError: No module named PIL
- Install Visual Studio 2015 on mac
- Decoding UTF-8 strings in Python
- How to have an array of arrays in Python
- Recursively find all files that match a certain pattern
- pip install mysql-python fails with EnvironmentError: mysql_config not found
- How do I update the password for Git?
- can’t remove python pip
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
- AttributeError(“‘str’ object has no attribute ‘read'”)
- Why does using from __future__ import print_function breaks Python2-style print?
- Python Error – int object has no attribute
- Installing GCC on macOS Catalina
- Loading a file with more than one line of JSON into Pandas
- Type error Unhashable type:set
- gdb fails with “Unable to find Mach task port for process-id” error
- Python: count repeated elements in the list
- How to use vim in the terminal?
- How to run Pip commands from CMD
- Arduino IDE is not showing any port macOS
- TypeError: coercing to Unicode: need string or buffer, list found
- Making sure /usr/local/bin is in my $PATH on mac
- ImportError: cannot import name NUMPY_MKL
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- Convert string to variable name in python
- dump() missing 1 required positional argument: ‘fp’ in python json
- Tkinter error: Couldn’t recognize data in image file
- How to install Openpyxl with pip
- Failed building wheel for Twisted in Windows 10 python 3
- Installing scipy for python 2.7
- How to resolve “ImportError: DLL load failed:” on Python?
- Install pip for python 3.5
- How to install PyQt4 on Windows using pip?
- How to install PyQt4 on Windows using pip?
- How to install latest version of openssl Mac OS X El Capitan
- Cannot remove entries from nonexistent file