It looks like your user does not have the permission to install packages in your system (for all users). Here’s how to fix this problem for Linux, macOS and Windows.
Linux / macOS
From your terminal, you can install the package for your user only, like this:
pip install <package> --user
OR
You can use su
or sudo
from your terminal, to install the package as root
:
sudo pip install <package>
Windows
From the Command Prompt, you can install the package for your user only, like this:
pip install <package> --user
OR
You can install the package as Administrator, by following these steps:
- Right click on the Command Prompt icon
- Select the option
Run This Program As An Administrator
- Run the command
pip install <package>
Related Posts:
- import opencv vs import cv2
- Updating matplotlib in virtualenv with pip
- ModuleNotFoundError: No module named ‘matplotlib’
- error: Unable to find vcvarsall.bat
- error: Unable to find vcvarsall.bat
- How do I update\upgrade pip itself from inside my virtual environment?
- ImportError: DLL load failed: The specified module could not be found
- How to uninstall a package installed with pip install –user
- TypeError: only size-1 arrays can be converted to Python scalars (matplotlib)
- ImportError: No module named pip
- Showing an image with pylab.imshow()
- ImportError: No module named tensorflow
- How do you change the size of figures drawn with Matplotlib?
- Cannot find module cv2 when using OpenCV
- Where is BeautifulSoup4 hiding?
- Cannot find module cv2 when using OpenCV
- ImportError: No module named matplotlib.pyplot
- How to resize an image with OpenCV2.0 and Python2.6
- Where does pip install its packages?
- How to install python3 version of package via pip on Ubuntu?
- Plotting a 2D heatmap with Matplotlib
- Save plot to image file instead of displaying it using Matplotlib
- “Defaulting to user installation because normal site-packages is not writeable” python message
- Could not find a version that satisfies the requirement tensorflow
- How to install pytorch in Anaconda with conda or pip?
- ImportError: numpy.core.multiarray failed to import
- Configuring so that pip install can work from github
- Error after upgrading pip: cannot import name ‘main’
- How to change the font size on a matplotlib plot
- How do I install Python OpenCV through Conda?
- ImportError: cannot import name main when running pip –version command in windows7 32 bit
- How to customize a scatter matrix to see all titles?
- Matplotlib automatic legend outside plot
- How to install pip3 on Windows?
- “ImportError: no module named ‘requests'” after installing with pip
- How can I upgrade NumPy?
- How can one display an image using cv2 in Python
- Matplotlib automatic legend outside plot
- Changing the “tick frequency” on x or y axis in matplotlib?
- matplotlib error – no module named tkinter
- Plot pie chart and table of pandas dataframe
- TypeError: ‘DataFrame’ object is not callable
- 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 add title to subplots in Matplotlib
- ‘pip3’ is not recognized as an internal or external command, operable program or batch file
- How to change a ‘LinearSegmentedColormap’ to a different distribution of color?
- Create own colormap using matplotlib and plot color scale
- Checking whether pip is installed?
- AttributeError: Module Pip has no attribute ‘main’
- How to increase plt.title font size?
- How to make a 3D scatter plot in matplotlib
- How to draw vertical lines on a given plot in matplotlib
- Changing the “tick frequency” on x or y axis in matplotlib
- How can I set the aspect ratio in matplotlib?
- python SyntaxError: invalid syntax %matplotlib inline
- OpenCV NoneType object has no attribute shape
- How to make a histogram from a list of data
- How do I change the figure size with subplots?
- ValueError: x and y must be the same size
- SystemError: new style getargs format but argument is not a tuple?
- Linear regression with matplotlib / numpy
- pip: no module named _internal
- Scatter plot colorbar – Matplotlib
- How to run Pip commands from CMD
- matplotlib: how to draw a rectangle on image
- How to install PyGame on Python 3.4?
- ImportError: No module named ‘cv2’ Python3
- Cannot import cv2 in python in OSX
- How to put the legend out of the plot
- Django Rest Framework — no module named rest_framework
- Matplotlib: TypeError: can’t multiply sequence by non-int of type ‘numpy.float64’
- RuntimeError: Invalid DISPLAY variable
- python NameError: name ‘file’ is not defined
- OpenCV NoneType object has no attribute shape
- ImportError: No module named Crypto.Cipher
- How to Install pip for python 3.7 on Ubuntu 18?
- How to crop an image in OpenCV using Python
- Why do many examples use `fig, ax = plt.subplots()` in Matplotlib/pyplot/python
- How to change pip installation path
- plot a circle with pyplot
- Pandas dataframe groupby plot
- inverting image in Python with OpenCV
- How to install Openpyxl with pip
- Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later
- OpenCV houghLinesP parameters
- How do I tell Matplotlib to create a second (new) plot, then later plot on the old one?
- How to resolve “ImportError: DLL load failed:” on Python?
- Install pip for python 3.5
- How to install PyQt4 on Windows using pip?
- How do I install pip on macOS or OS X?
- How to install PyQt4 on Windows using pip?
- Python OpenCV2 (cv2) wrapper to get image size?
- Equivalent to matlab’s imagesc in matplotlib? [duplicate]
- Pip: could not find a version. No matching distribution found
- ValueError: total size of new array must be unchanged
- alueError: ordinal must be >= 1
- File “/usr/bin/pip”, line 9, in
from pip import main ImportError: cannot import name main