Unable to install pip on windows 10 with Python 2.7 [duplicate] - python-2.7

This question already has answers here:
'pip' is not recognized as an internal or external command
(39 answers)
Closed 1 year ago.
I am on Windows 10 with Python 2.7 installed. I installed pip following instructions here:
I also see following message at end of installation:
Successfully installed pip-20.3.4
But when I do 'pip help'(in a new command prompt), I see:
'pip' is not recognized as an internal or external command, operable
program or batch file.
What else is needed to get it working?

Manually add pip path to env variable PATH. Pip is installed at location C:\Python27\Scripts.

Related

Errow while working with django, psycopg file shifting to mac (I WOULD ANSWER MYSELF, IT MAY HELP SOMEONE) [duplicate]

This question already has answers here:
Error Installing Psycopg2 on MacOS 10.9.5
(26 answers)
Closed 6 months ago.
I recently shifted to MAC M2 MONTEREY & one project involved django & my dev env from older system isn't setup here. I got error while installing "psycopg" like this:
Using cached psycopg2-2.8.5.tar.gz (380 kB)
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_97efcf6747c249769acdc8430ba4238f/setup.py'"'"'; __file__='"'"'/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_97efcf6747c249769acdc8430ba4238f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r
cwd: /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_97efcf6747c249769acdc8430ba4238f/
Complete output (23 lines):
running egg_info
creating /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info
writing /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
==============================================================================
Its beginning of the error, After that its tried to install each previous version of Psycopg
==============================================================================
Searching out for solution, a few things helped me out so here's the answer from my side thinking it may help someone else :)
I was using virtual environment for python for the project.
Solution steps:
upgrade pip3 to latest version
upgrade setup tools with pip3 install --upgrade setuptools, check the version with pip list
Also try installing "postgres" with brew install postgres on the system not in the virtual env of that project (if you're using one) & you can't add it in requirements.txt (INCASE OF AN AUTOMATED DEPLOYMENT) instead you have to then create a bash script which installs OS dependencies first & then the project dependencies with pip3 install -r requirements.txt.
This worked for me.

Fake installization in django

When I install django (pip install django) the cmd say Requirement already satisfied
but when I do this (django-admin --version) to get the version the cmd say
'django-admin' is not recognized as an internal or external command,
operable program or batch file.

Can not install django via Ubuntu bash on windows [duplicate]

This question already has answers here:
Trouble installing Django: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-rcF9a5/Django/
(2 answers)
Closed 5 years ago.
happy holidays to you :)
I can not install the Django package by the python pip package manager.
The installation returns an error that you can see below on the image
If you want more pictures to help me, let me know
Windows 10 - Ubuntu terminal
Thank you, simply
The latest django version does not support python 2.7 try this
pip install django==1.11

I'm unableto install django [duplicate]

This question already has answers here:
How to install Django in Ubuntu 11.10
(3 answers)
Closed 5 years ago.
I tried install the django by using regular commands.but it is not installing
sudo pip install django
or
inside virtualenv
source bin/activate
then
pip install django

How to run python file from windows?

i have installed following packages to my windows machine -
python-numpy
python-matplotlib
python-pyside
but when i m running a command "python script.py" it says python is not an internal or external command
You need to add Python to your environmental variables.
More info under this link
http://docs.python.org/2/using/windows.html