Home > Blockchain >  How can i install packages?
How can i install packages?

Time:12-18

I can't install a package with pip command and i can't install it from Python İnterpreter in PyCharm too.İ can't tap to the ' ' at Python İnterpreter in PyCharm. I get an error: 'pip command not found' pip3 too

CodePudding user response:

3 commands

sudo apt update
sudo apt install python3-pip
pip3 install <package_name>

or maybe

sudo apt install <package_name> -y

CodePudding user response:

Here is what you can try.

  1. Lets check python installation.
C:\Users\User>python --version
Python 3.10.5

C:\Users\User>

If you get the version as 3.x, then we are good, else goto your python installation directory and copy its path and then add it to your environment variable PATH.

  1. Check PIP available or not.
C:\Users\User>pip --version
pip 22.3 from C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\pip (python 3.10)

C:\Users\User>

if above didn't work then add pip path to PATH environment variable which would be something similar to above output.

  1. Now we are ready to install any package

Just do pip install package-name for testing, you can try: pip install numpy If it still throws error, try below one python -m pip install numpy if it still throws error, then you might need to clean your python installation.

  • Related