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/
json is a built-in module in Python, you don't need to install it with pip.
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.
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.
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.
json
is a built-in module, you don't need to install it with pip
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With