Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"pip install json" fails on Ubuntu

Cannot install the json module. As far as I know I shouldn't use sudo. what's the matter?

 pip install json The directory '/home/snow/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/snow/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting json   Downloading json-99.0.tar.gz     Complete output from command python setup.py egg_info:     Traceback (most recent call last):       File "<string>", line 1, in <module>       File "/tmp/pip-build-YkvqVh/json/setup.py", line 2, in <module>         raise RuntimeError("Package 'json' must not be downloaded from pypi")     RuntimeError: Package 'json' must not be downloaded from pypi      ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-YkvqVh/json/ 
like image 435
Eugenio Avatar asked Jan 04 '17 14:01

Eugenio


People also ask

Do I need to pip install json?

json is a built-in module in Python, you don't need to install it with pip.

Does pip install work on Ubuntu?

Pip is a package management system that simplifies installation and management of software packages written in Python such as those found in the Python Package Index (PyPI). Pip is not installed by default on Ubuntu 18.04, but the installation is pretty straightforward.

Why is pip not installed on Ubuntu?

The python-pip package manager works as an independent package manager on Linux distribution. This means you need to install the pip tool separately from python programs. The pip command is not found an error raised on your Linux terminal window if the pip is not installed independently on Ubuntu 20.04 system.

Can not install with pip?

One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.


1 Answers

json is a built-in module, you don't need to install it with pip.

like image 180
alecxe Avatar answered Oct 01 '22 12:10

alecxe