Cannot user easy_install or install pip - python-2.7

I am a noob here. Because I need to use Python 2.7 for work, I created another user login and tried to re-setup my dev environment. I have reinstalled python 2.7 using brew but I couldn't get easy_install or work and my system cannot find where pip is. Much frustration here, hope someone can help!
I have already tried to install pip and the system still cannot find it:

Related

In Windows 10, pip import error: cannot import name main after installing pipenv

I am trying to use pipenv as well as pip and having some issues. I installed pipenv using pip. I installed pipenv using pip. Then I went back and tried to run pip -v and got the following: ImportError: cannot import name main. I have seen this question answered for Linux and Mac, but I cannot use sudo or which commands; I am on Windows 10 using the CMD console. In my scripts folder, I see pip, pip2.7, and pip2. I cannot remember which one was my system pip. I know I need to maybe uninstall and reinstall (I have already tried to upgrade, but of course, without pip running you can't upgrade pip). I don't want to make more of a mess, so I wanted to ask how to resolve this in the CMD console on Windows.
Apparently, when I installed pipenv, it changed the system pip version that I was previously using. For some reason, all of the answers I found were using Linux or Mac, but here is how I resolved it. Simply open your command prompt and type:
$python -m pip uninstall pip
Then, test that you still have your old version installed by typing:
$pip -V
This showed me that I had gone from using pip version 18 back to using version 8.1.1. You should then be able to proceed to other tasks using pip.

Missing pip in python 2.7?

I am attempting to install a module (requests) in python 2.7.4 but am unable to do so because apparently I don't have pip installed? I tried to run "python pip --version" in CMD to check for it and got nothing in return except that pip is not a recognized command.
Have been googling the past 20 minutes and have tried each suggestion to no avail. Sorry for the stupid question but this is quite infuriating.
Python 2.7 must be having pip pre-installed.
Try installing your package by:
Open cmd as admin. (win+x then a)
Go to scripts folder: C:\Python27\Scripts
Type pip install "package name"
Note: Else reinstall python: https://www.python.org/downloads/
Also note: You must be in C:\Python27\Scripts in order to use pip command, Else add it to your path by typing: [Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27\;C:\Python27\Scripts\", "User") For New versions
Older versions of python may not have pip installed and get-pip will throw errors. Please update your python (2.7.15 as of Aug 12, 2018).
All current versions have an option to install pip and add it to the path.
Steps:
Open Powershell as admin. (win+x thena')`
Type python -m pip install <package>.
If python is not in PATH, it'll throw an error saying unrecognized cmd. To fix, simply add it to the path as mentioned above.
The new version of python is already contains pip. I feel that you yet not set the environment path. just set environment path and try again.
If the issue still exists you just install pip using typing the following command in CMD
python -m pip install.
According to this answer
Good news! Python 3.4 (released March 2014) and Python 2.7.9 (released December 2014) ship with Pip.
so perhaps updating to 2.7.9 will solve your problem. Or you could follow some of the other suggestions in that answer to install pip manually.
For Ubuntu
sudo apt install python3-pip
or
sudo apt install python-pip
Try this instead, if you are using windows OS type in command line ".\pip " and whatever command you want to use after, it can be install uninstall etc.

Installing Django using pip

I'm trying to install Django using pip on my windows machine, however i keep getting an error in command prompt:
Fatal error in launcher: Unable to create process using '"'
I've been searching around on the internet for solutions, but I cant seem to find any.
Thanks in advance
Make sure you have a virtual env setup. Then activate it and try installing django.
Try use the python installation from Active State http://www.activestate.com/activepython/downloads
I'm a Linux User but I've used python and Django on Windows with ActiveState.
When you install it, the installation create a folder with any utils tools, like pip, easy_install and etc... And the pip of this script works well
Have you tried
python -m pip install django
as advised here

Unable to get these to cooperate: mysql-python + virtualenv + percona + centos6

I've gone through many threads related to installing mysql-python in a virtualenv, including those specific to users of Percona. None have solved my problem thus far.
With Percona, it is normal to get a long error on pip install MySQL-python in the virtualenv that ultimately says EnvironmentError: mysql_config not found. One method to remedy this is yum install mysql-devel, which I've done. I can actually get mysql-python to install properly outside of the virtualenv via yum.
I'm getting the error in the virtualenv only - it uses Python 2.7.9, wheareas 2.6.6 is what comes with Centos.
Also, with MySQL-python installed via yum it will import to the OS's python interpreter, but will not import into the virtualenv's python interpreter.
To clarify, I only installed mysql-python via yum to see whether or not it would work that way. I would prefer it be by pip, in the environment only.
What am I missing here? As far as I'm aware it should work - considering it will work outside of virtualenv.
Found the solution!
I think it was improper of my to install mysql-devel in the first place, so I went ahead and uninstalled it.
Instead, I used a packaged supplied by Percona - Percona-Server-devel-55
yum install Percona-Server-devel-55 and the problem is solved!

Why won't pip install anything?

Whenever I try to pip install anything in my virtualenvs I am told it is Downloading/Unpacking. My terminal then stays on that line indefinitely. The longest I have left this running was 2 hours (trying to install iPython) without success.
Most recently, I tried installing django in one virtualenv using pip. Once it said Downloading/Unpacking I created another virtualenv in another terminal window and used easy-install to install django and mezzanine. Both installed with their dependencies before there was any movement on the terminal using pip. I left the pip window running for an hour before giving up. I have tried pip install, pip install -v --use-mirrors and their sudo equivalents without much change in the results (-v --use-mirrors spews out a list of urls before stalling at Downloading/Unpacking).
I am using Python 2.7 on Ubuntu 12.04.1 64-bit. I use Virtuanlenvwrapper to create and manage my virtualenvs, if that helps.
I can't find any references to other people having this problem so I expect it's a mistake of mine. Does anyone have any idea what I'm doing wrong?
Following #HugoTavares's suggestion I found I needed to install python-dev. I don't know why this helped but it seems to have solved this particular problem. I'm putting this answer on for now but Hugo, if you read this, please post an identical one and I'll remove acceptance on this and accept yours, since you deserve the credit.