Pip is not installing anything - cmd

Whenever i try to install anything through pip, nothing happens. When i type in the command for installing a module and press enter, Nothing happens and the next prompt shows up.
This command
C:Users\ABC>python -m pip install target-package
returns:
C:\Users\ABC>
How do i fix this ?
I am using Windows 10.
I couldn't find any working solution for this problem.
I have tried re-installing pip and upgrading pip but nothing works.

What is your output when you run pip -V and python -V commands in your cmd?

Related

Basemap install on mac without fink (I tried everything I can google)

I am a Python Noob. (Using Mac OS 10.12 & Python 3.7)
I'm trying to use mpl_toolkits.basemap
to execute the code
from mpl_toolkits.basemap import Basemap
I googled the way to get matplotlib and successfully installed it.
However, while it's possible to run "from mpl_toolkits.basemap import Basemap" in terminal on mac,
it fails to be loaded if I run the command within IDLE.
Then, I googled to figure out the issue and got the hint that
it could be resolved if I install Basemap properly.
To install Basemap, I think I need to go with "FINK".
However, Fink is only available up to 10.5 OS while mine is 10.12.
And FINK website says do not update OS before upgrading FINK.
However, it's too late for me.
Cause I updated my OS longtime ago and recently I started to learn Python Using Mac.
So I guess, if there is a way to install Basemap not using apt-get,
(the codes below is from "Python basemap module impossible to import")
sudo apt-get install libgeos-3.5.0
sudo apt-get install libgeos-dev
sudo pip install https://github.com/matplotlib/basemap/archive/master.zip
I think my issue could be cleared.
Since I'm really really noob, I'm not sure this is the reason for my failing in "from mpl_toolkits.basemap import Basemap".
What I tried so far is
1) brew install basemap
with the error of
Error: No available formula with the name "basemap"
==> Searching for a previously deleted formula (in the last month)... Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
2) pip install basemap
with the error of
Requirement already satisfied
3) sudo pip install https://github.com/matplotlib/basemap/archive/master.zip
with the error of
Command "python setup.py egg_info" failed with error code 1 in
/private/tmp/pip-install-lux494o4/pyproj/
4) conda install basemap
with the following message of
All requested packages already installed.
5) conda install -c conda-forge basemap
with the following message
Preparing transaction: done Verifying transaction: done Executing
transaction: done
Can anyone help to install basemap properly so that I could run
"from mpl_toolkits.basemap import Basemap"
in my IDLe?
My IDLE Sheel keeps saying
Traceback (most recent call last): File "", line 1, in
from mpl_toolkits.basemap import Basemap ModuleNotFoundError: No module named 'mpl_toolkits.basemap'
while my terminal doesn't have problem with running the code.
Appreciate it in advance.
any luck? I spent the day battling this as well. I had the most success when I tried downloading an older version of basemap.
I was using python 2.7 and this worked okay sudo -H pip2 install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz
For python 3 try replacing pip2 with pip3 or pip.
Ran into this myself today my solution:
install libgeos on mac
brew install geos
then as you suggested use pip to install mpl_tools:
pip3 install -q https://github.com/matplotlib/basemap/archive/master.zip
This also may help:
missing libgeos_c.so on OSX
Firstly, I suggest you to set Anaconda up. Then follow below steps;
Create a new environment in anaconda.
Install Jupyter Notebook and launch it. If it works, turn it off.
Change your anaconda environment in your terminal.
Try installation commands below;
conda install ...
conda install forge ...
pip install ...

why can't I install flake8 by pip?

I did like this
pip install flake8
then, terminal says that it has already installed and it is in
.pyenv/versions/anaconda3-2.1.0/lib/python3.4/site-packages. But,I did like this
which flake8
then, terminal says nothing. Why? I couldn't install that ?
It appears that your pip is using your pyenv installed version of python from anaconda. With that in mind, you should ensure that python points to that as well and do python -m flake8. That will let you run flake8.
Flake8 does not control where it's executable is installed to, but as long as you use the same python as is being used by pip, then you will still be able to run it.

Using pip to install iPython Notebook

Edit:
According to the pip website (https://pip.pypa.io/en/stable/installing), I should already have pip installed with my Python version 2.9.7, but I assumed that I don't because of the error message.
I then attempted to install pip by downloading get-pip.py. It was successful but I got the messages:
Found existing installation: pip 1.3.1
Uninstalling pip-1.3.1:
Successfully uninstalled pip-1.3.1
Successfully installed pip-8.1.1 wheel-0.29.0
So it seems I did have a version of pip, so I'm not sure why I was getting the error message described in my original post.
But when I tried to then pip install jupyter, I just get:
-bash: pip: command not found
again. Can someone tell me what I'm doing wrong please?
I need to install iPython Notebook. I already have Python (version 2.7.9) installed on my Macbook, running OS X (version 10.7.5).
After some initial investigation, I saw somebody say that I could just run:
pip install "ipython[notebook]"
When I did this however, I got:
-bash: pip: command not found
So do I have to install pip first? And then use pip to install the Notebook? I'm out of my depth and a little confused!
Okay so my problem was that pip was installed, but in a location that was not included in my $PATH variable.
One of the answers here is relevant.

pip doesn't perform to install a module in Python 2.7, Windows 7

For Windows 7, x64, I'm trying to configure some libraries in Python. I use Python 2.7.11 and the Visual C++ Compiler Package for Python 2.7. When I try to install the library 'numpy-1.10.4+mkl-cp27-none-win_amd64.whl' using pip or easy_install, like:
C:\Python27\Scripts pip install D:\Downloads\numpy-1.10.4+mkl-cp27-none-win_amd64.whl
Nothing happens! I only see blank and can't do anything against it. After searching many pages about similar issues, I followed the instructions from this page:
http://arunrocks.com/guide-to-install-python-or-pip-on-windows/
Thus after installing pip and easy_install in the same path as Python and checking my environment variable the problem still persists..
Do anybody know what else I can do to use pip, or to install the wanted libraries? I'm really thankful for any idea!
You need to use the --use-wheel flag, and also have installed wheel. For example:
pip install wheel
pip install --use-wheel yourfile.whl
Your Windows Account doesnt have full persmissions. Maybe it says its Administrator, but something (ex Server) blocks some operations. I had the same issue at work, I couldnt install PIP but also XAMPP server on my PC.
However, I solved 1st issue - simply ran CMD as Admin, then went to
C:\Python27 and typed:
python.exe -m pip install MySQLdb
so PIP worked, and finally I updated it:
pip install --upgrade pip
P.S: I had 2 pythons 2.7 and 3.5 but did not reinstall or delete anything.

IPython command not found Terminal OSX. Pip installed

Using Python 2.7 installed via homebrew. I then used pip to install IPython. So, IPython seems to be installed under:
/usr/local/lib/python2.7/site-packages/
I think this is true because there is a IPython directory and ipython egg.
However, when I type ipython in the terminal I get:
-bash: ipython: command not found
I do not understand why this ONLY happens with IPython and not with python? Also, how do I fix this? What path should I add in .bashrc? And how should I add?
Currently, my .bashrc reads:
PATH=$PATH:/usr/local/bin/
Thanks!
I had this issue too, the following worked for me and seems like a clean simple solution:
pip uninstall ipython
pip install ipython
I'm running mavericks and latest pip
Check IPython whether is installed by below command:
$python -m IPython
If you got this result as above picture.
Then run this command on terminal and add into ~/.bash_profile file
$alias ipython='python -m IPython'
So try run "ipython" again on terminal. It works fine for me.
Reference topics:
ipython on MacOS 10.10 - command not found
iPython installed but not found
Create .pydistutils.cfg in your homedir with following content:
[global]
verbose=1
[install]
install-scripts=$HOME/bin
[easy_install]
install-scripts=$HOME/bin
And then: pip install -U --user ipython. Of course $HOME/bin must be in your $PATH. Packages are going to be installed in $HOME/Library/Python, so user only, not system wide.
Try run brew install ipython:
then run xcode-select --install;
run brew install git,
If you got this result as above picture. Refer to enter link description here
At last, run brew install ipython
I use pip3 install ipython is OK.
maybe ipython rely on python3
After trying to a number of solutions like above with out joy, when I restarted my terminal, Ipython command launched. Don't forgot to restart your terminal after all the fiddling!
P.S. I think the brew install Ipython did it ... but can't be sure.
For me the only thing that helped was:
python -m pip install --upgrade pip
Upgrading pip did the work and all the installations started working properly!
Give it a try.

Resources