Unable install requirements.txt - python

After cloning a Django application, I went to install the virtual environment in terminal.
I entered the folder and typed: pip install -r requirements.txt
but got the error: -bash: pip: command not found

It seems that you are missing the pip itself which you can install from packaging repository depending on your OS or download (manually or with wget) the and install it using python. This will automatically associate your python version with required pip version. See following commands:
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

Related

how to fix a broken pip install? [duplicate]

This question already has answers here:
My pip is broken on Windows, how can I fix it?
(3 answers)
Closed 1 year ago.
C:\WINDOWS\system32>python -m pip install -U --force pip
C:\Python39\python.exe: No module named pip
I broke my pip install trying to update it and am unsure how to fix it
I think you accidentally delete pip or did not install it, my suggestion is to reinstall pip by
Download get-pip.py and "Save As" the file using right-click.
Open a command prompt as an administrator
cd to the path where you saved the file, in my case
python get-pip.py
cd C:\Users\xyz\Downloads> then type python get-pip.py. It will install all required packages, such as wheel and pip.
To check if it was installed correctly, type pip --version in the command line.
Before downloading pip firstly check pip already installed or not. For checking open cmd type
pip help
if it responce than pip installed already.
For downloading pip then, run the following command in cmd to download the get-pip.py file:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
To install PIP run the following command in cmd :
python get-pip.py
for confirming whether pip installed or not than again type
pip help
if it responce than pip successfully installed.
To check the current version of PIP,enter the following in the cmd:
pip --version
To upgrade PIP on Windows, enter the following in the cmd:
python -m pip install --upgrade pip
This command uninstalls the old version of PIP and then installs the most current version of PIP.
It seems like you do not have pip module in your system.
I recommend to download python again and you will have the newest possible version of pip. Or you may use "pip help" command

How to install python packages using pip on go daddy linux hosting (don't have root access)

Could you tell me how to install packages using pip on Go daddy Linux hosted server. It doesn't provide root access.
When I try to install some python package
pip install numpy
it shows:
-bash: pip: command not found
It is giving my Python 2.6.6 and the location is:
/usr/bin/python
Is there any hack for it?
You don't have pip installed. To install pip run this
easy_install --user pip
This will install pip for only you, without root access. If you don't have 'easy_installed' installed, you can run this to install pip without it
wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user
pip will be installed in .local/bin, to access it just use
.local/bin/pip install numpy
To add pip to your PATH, so that you could access it like pip install numpy
execute this command:
echo "PATH=\$PATH:~/.local/bin" >> ~/.bashrc
and then this:
source ~/.bashrc

azure webjob python error: could not create 'D:\Python34\Lib\site-packages\requests': Access is denied

I am trying to install requests from my requirements.txt file on Azure.
When I run:
python.exe -m pip install --upgrade -r requirements.txt
I get the error:
could not create 'D:\Python34\Lib\site-packages\requests': Access is denied
In my Azure webapp I have installed the following python extension:
Python 3.6.1 x64 3.6.1.3
So I am presuming that I need the 'requests' package to install to here:
D:\home\python361x64\Lib\site-packages\ instead of 'D:\Python34\Lib\site-packages\
Any ideas how I can fix this ?
Got it working by creating a run.cmd file & then specifying the python path to run python.exe from eg. D:\home\python361x64\python.exe get_stats.py – Pete Stilgoe yesterday
And running python.exe -m pip install --upgrade -r requirements.txt from the version path eg D:\home\python361x64\python.exe -m pip install --upgrade -r requirements.txt – Pete Stilgoe yesterday

Windows 10 - Installing Django

Getting the attached error when am trying to install Django.
throws up the following error
"could not find the version that satisfies the requirement install"
cd c:\Users\viku.jain\Downloads
python get-pip.py
pip install django==1.9
or you can install django using Git
Make sure that you have Git installed and that you can run its commands from a shell
git clone git://github.com/django/django.git
pip install -e django/
the you can start your work by django-admin utility command

error when trying to install pip on mac 10.7

I am trying to download pip onto my mac by following the instructions on the pip installation guide and I am coming up with this error after running the following command
$python get-pip.py
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/
MacOS/Python: can't open file 'get-pip.py': [Errno 2] No such file or directory
This is happening after I download the 'get-pip.py' doc as the instructions suggest. Do I need to put this file in a certain location before I continue? I am relatively new to downloading programs through the terminal.
Thanks for the help!
It is recommended (highly) that you NOT use the version of Python that ships with your Mac. Instead use HomeBrew and install a "custom" version of Python (usually the latest). Then proceed to use virtualenv and optionally virtualenvwrapper
Prerequisites:
First, install Xcode from the App Store (it's FREE).
Install HomeBrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Install Python:
brew install python
This will install pip for you as well in /usr/local/bin/.
Install virtualenv:
pip install virtualenv
virtualenv Basic Usage:
virtualenv /path/to/my/env
cd /path/to/my/env
source ./bin/activate
# hack on your python project
deactivate # to go back to your normal shell
Please follow instructions for virtualenv for more details.
virtualenvwrapper is also really convenient and worthwhile learning.
Update :
More explanation at #dval 's comment
$ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
and then execute
$ python get-pip.py
None of the above solutions worked for me, so I decided to straight out clean install Python 3.6 from the downloads page at python.org.
After you have completed the Python installer, go into Terminal and type in:
curl -O https://bootstrap.pypa.io/get-pip.py
Wait for the download to complete and then type in:
python3 get-pip.py --user
Then for your pip commands you will use 'pip3'. For example:
pip3 install awsebcli --upgrade --user
After python and pip have been installed they should be in your user Library. So update your PATH in terminal like so:
export PATH=~/Library/Python/3.6/bin:$PATH
I have a bash_profile shell so I also ran the following command in terminal to load script into my current session:
source ~/.bash_profile
After this, verify that your pip installed component was successful.
For example:
eb --version
See AWS for the above reference.
Curl did not work for me. I had to use "wget".
$ wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
and then execute
$ python get-pip.py

Categories

Resources