Python 3.4: using pip - matplotlib

I've read in the documentation that Python3.4 ships with pip installed. When I try to make a call however I get an error. What am I missing?
U:\>py -V
Python 3.4.2
U:\>py -3.4 -m pip install matplotlib
C:\Python34\python.exe: No module named pip

Related

Error intsalling tensorflow via pip install

WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an EnvironmentError: [WinError 2] The system cannot find the file specified: 'c:\python38\Scripts\chardetect.exe' -> 'c:\python38\Scripts\chardetect.exe.deleteme'
I was trying to install Tensorflow via command pip install tensorflow. and after downloading everything at the end found this error..can anyone tell me why this happened?
According to https://www.codegrepper.com/ you can use these two:
In Windows
python -m pip install -U pip --user
In Linux
pip install -U pip --user

How to change Matplotlib from version2 to version 3?

When I type matploblib.__version__ in python, it returns '2.1.2'. I am wondering is there a way to change matplotlib 2 to matplotlib 3?
I am using python3 and MacOS. Thanks!
You can install the latest version via conda or pip:
conda install -c conda-forge matplotlib==3.1.3
or
python -m pip install -U pip
python -m pip install -U matplotlib
Check out the tutorial on this page.
https://matplotlib.org/users/installing.html

How can I download and install Numpy and Pandapower?

How can I Download and install numpy and pandapower on the RASPBIAN JESSIE LITE Minimal image based on Debian Jessie? the one without the GUI. And how can I download and install Pip and miniconda on it as well?
um i am pretty sure the commands are the same are they not? Have you searched this up yet? i am sure that if you have another computer you can just search up miniconda and copy the download link and follow the instructions. pip is automatically installed in miniconda and if you dont have it do
sudo apt-get install python-pip
and for numpy do
pip -U install numpy
or
conda install numpy
for pandapower
conda install pandapower
pip -U install pandapower
or if you cant get miniconda with the method above just do
sudo apt-get install python
that will get you python and pip.
Good Luck!!

Install numpy on python3.3 - Install pip for python3

For python 3.2 I used sudo apt-get install python3.2-numpy.It worked.
What to do for python3.3? Nothing I could think of works. Same goes for scipy, etc.
Thanks.
Edit: this is how it looks like
radu#sunlit-inspired:~$ python3
Python 3.3.2 (default, Jul 3 2013, 10:17:40)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'
In the solution below I used python3.4 as binary, but it's safe to use with any version or binary of python. it works fine on windows too (except the downloading pip with wget obviously but just save the file locally and run it with python).
This is great if you have multiple versions of python installed, so you can manage external libraries per python version.
So first, I'd recommend get-pip.py, it's great to install pip:
wget https://bootstrap.pypa.io/get-pip.py
Then you need to install pip for your version of python, I have python3.4 so for me this is the command:
python3.4 get-pip.py
Now pip is installed for this version and in order to get libraries for python3.4 I have to use pip like this:
python3.4 -m pip
So if I want to install numpy I'd use :
python3.4 -m pip install numpy
Note that numpy is quite the heavy library. I thought my system was hanging and failing.
But using the verbose option, you can see that the system is fine :
python3.4 -m pip install numpy -v
This may tell you that you lack python.h but you can easily get it :
On RHEL (Red hat, CentOS, Fedora) it would be something like this:
yum install python34-devel
On debian-like (Debian, Ubuntu, Kali, ...) :
apt-get install python34-dev
Then rerun this :
python3.4 -m pip install numpy -v
From the terminal run:
sudo apt-get install python3-numpy
This package contains Numpy for Python 3.
For scipy:
sudo apt-get install python3-scipy
For for plotting graphs use pylab:
sudo apt-get install python3-matplotlib
The normal way to install Python libraries is with pip. Your way of installing it for Python 3.2 works because it's the system Python, and that's the way to install things for system-provided Pythons on Debian-based systems.
If your Python 3.3 is system-provided, you should probably use a similar command. Otherwise you should probably use pip.
I took my Python 3.3 installation, created a virtualenv and run pip install in it, and that seems to have worked as expected:
$ virtualenv-3.3 testenv
$ cd testenv
$ bin/pip install numpy
blablabl
$ bin/python3
Python 3.3.2 (default, Jun 17 2013, 17:49:21)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>>
I'm on Ubuntu 15.04. This seemed to work:
$ sudo pip3 install numpy
On RHEL this worked:
$ sudo python3 -m pip install numpy
My issue was the failure to import numpy into my python files. I was receiving the "ModuleNotFoundError: No module named 'numpy'". I ran into the same issue and I was not referencing python3 on the installation of numpy. I inputted the following into my terminal for OSX and my problems were solved:
python3 -m pip install numpy
On fedora/rhel/centos you need to
sudo yum install -y python3-devel
before
mkvirtualenv -p /usr/bin/python3.3 test-3.3
pip install numpy
otherwise you'll get
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.

installing numpy for python 3.1.2 on Ubuntu 10.04

I've searched everywhere I could and I couldn't find appropriate answer. I don't know how to install numpy so I could use it in Geany with python 3.1.2. It only works for python 2.6.5. I'm new to ubuntu.
edit: I get ImportError: No module named numpy
If python 3.1.2 is installed via python3 package then you could try:
$ sudo apt-get install python3-numpy
Tried the apt-get installation solution above but it didn't work, however, pip did work:
$ sudo pip3 install numpy
Also, here are the install instructions for pip if needed.