Pip Not recognized as an external command in cmd in windows - python-3.x

When I am trying to install the Python 3.7.1 It installed the Python 3.7.1. I can also check the pip install checkbox. Later I am trying to install pip in cmd. The below error occurs. When I try to see the pip.exe file in Python37/Scripts it shows an empty folder. I don't know what to do and what is the issue. Please help me because it was my study project to do.

Your pip is not setup during installation, you can re-run the python installer and make sure to check the option to install pip or simply access pip using:
python3 -m pip
All commands are the same,so you can install packages like:
python3 -m pip install cython
Hope this works for you!

Related

Error when trying to install oct2py package

I am trying to install to oct2py package to import in my python script. However whenever I run the command pip install oct2py I get the following error:
Fatal error in launcher: Unable to create process using '"c:\python37\python.exe" "C:\Program Files\Python37\Scripts\pip.exe" ': file cannot be found.
How can I install oct2py?
Found the answer
Deinstalled python and reinstalled it. I checked the environment variable and changed it from this one : 'C:\Program Files\Python39' to this one 'C:\Users\lsee\AppData\Local\Programs\Python\Python39'.
Is unable to locate your pip installer, easy fix is unusually to either upgrade or test pip :
# to upgrade your pip
python -m pip install --upgrade pip
pip --version
# test you have pip in your machine
If your pip version is showing that means you have it installed, it could be a problem activating your virtual environnement, or your path.
It says the file cannot be locate, are you sure your path for Python and pip is correct ?
Try:
python -m pip install oct2py
This should work (as python -m pip install gave not errors)

How to run pip from python3.7.1

I'm having python3.7.1 installed on my Mac, but when I run the command pip --version it shows syntax error. It's said that for python3 and greater versions pip is pre-installed, but why still I'm not able to use pip from python3?
pip might be outdated, check for updates running this command on terminal in your Mac:
pip install -U pip
Also doble check the version you have by running:
python --version
if you get
“Python is not defined”
you will need to reinstall it.
Further reading: Installing Python Modules

Pip on only installs to python27 while i need it to install on python37

I have multiple instances of python in my computer namely python27, python3.6 and python 3.7.
The import module for docx worked daily on python27 until suddenly it stopped working today. I tried installing the module again using pip in windows command line.
It says only installed in python27 directory. But there's an
importError on my script.
I guess I should be high time i transferred into python37 but I can't seem to make pip install into python 3.7
Can someone offer some advice as to the messy situation I'm in?I want to transfer to python3 and install docx in python3
Already checked modules using pip and docx is not there.
You should try setting your command prompt on the version of Python you want the module to install. Then, just use "pip", to install.
This is how you can do this:
Go into File Explorer (hopefully you have windows) and press and hold the shift key, then right click the folder that you want command prompt to look at. In this case, the folder with the version of Python. Then you click on the command prompt selection, and you're golden. Just use "pip install xyz" from there on. Glad to help
- BURAK ILOGLU
for python 3 try below given approaches.
sudo apt-get install python3-pip
this should get you pip3 and you can use pip3 to install packages specific to python3
and also
python3 -m pip install <package name>

How to install xlrd in python3 library

I am trying to install xlrd to read Excel files in python.
I have tried this: pip install -U pip setuptools. My macOS Mojave 10.4.3 has Python 2.7 which is where the default install goes to. But I have also installed Python3.7. How do I get pip install to my 3.7 directory?
I am on Mac machine(Catalina -version 10.15.5) and below pip3 command worked for me.
pip3 install xlrd
python version : 3.7.6
OS : Mac-Catalina(10.15.5)
Thanks to #Tapan Hegde, pip3 install xlrd worked from me, after installing the pip3, like this:
sudo apt update
apt install python3-pip
pip3 install xlrd
I reckon the easiest/cleanest solution would be to use a tool that isolates your python environment, such as virtualenv
Once installed, create a virtual env by specifying which version of python you want to use:
$> virtualenv -p python3 env
Note: puttin python3 directly works only for mac, with linux, you must specify the absolute path or your python binary.
And then 'activate' your environment:
$> source env/bin/activate
From here, any python or pip command you use will use python3.
$> pip install xlrd
Virtualenv has the advantage of not 'polluting' your local python installation, your can manage your pip modules installed more easily.
If you want more detail on how it works and the other alternatives, check this post
When pip install xlrd not work and in computer is still old version, then try do it with current version, for example pip install xlrd==2.0.1.
The current versions are here

Simple python library can't install

Windows 10 Enterprise version 10.0.1.15063 build 15063. Tried both pip and pip3:
pip install scipy
pip3 install scipy
Both didn't work. Even tried to specify path of python directory, still didn't work.
If you're using Windows, open Command Prompt (CMD) and run this command
run python pip -m install [module]
OR
run py pip -m install [module]
Finally installed.
Just updated git and ran the same command again "pip install scipy"
but this time it worked and installed the library.

Resources