How can I upgrade the version of matplotlib to 1.10 for python 2.7
Have you tried just installing it again via pip? Example pip command taken from here:
python -mpip install -U matplotlib
Do you use a virtual environment? If you do - you will have to activate it first. For this go to the console and type
For windows:
activate vitual-environment-name
For ubuntu:
source activate virtual-environment-name
After that (and if you don't have a virtual environment) just type:
pip install -U matplotlib
If that doesn't work try:
python -m pip install -U matplotlib
But in your case the version of six should be >= 1.10.
To do that use pip again and in your console type
pip install -U six
If that doesn't work try:
python -m pip install -U six
pip install -U matplotlib
it is easy to update modules
Related
I am new in working with a kinect. I am using a Mac OS Sierra 10.12.6.
Wheneve I try to update python with :
sudo -H python2 -m pip install -U pip # Update pip
I got this error:
File "<stdin>", line 1
sudo -H python2 -m pip install -U pip # Update pip
^
SyntaxError: invalid syntax
How do we fix it?
What you are doing is running a console command inside python shell,
press ctrl+D to exit out of python shell and then try executing the pip upgrade command
to upgrade pip using pip itself
pip install --upgrade pip # run in console/terminal
to upgrade pip using python
python -m pip install --upgrade pip # run in console/terminal
You can avoid the need for sudo if you're just a single user on your machine. This also avoids potentially messing around with the system-wide installation.
Use
python2.7 -m pip install pip --upgrade --user
The --user option will install the updated pip package just for your user account. Everytime you use python2.7, it will use the newer pip package.
System routines will not see the newer pip package, nor be bothered by it.
python2.7 is needed, because python2 doesn't really exist: it's either python or python2.7 for version 2. Python version 3 doesn't (apparently) exist by default on macOS.
I am attempting to install matplotlib and scipy to python, and using pip to do so. However when I attempted to install scipy with pip install scipy --myuser I received the message:
invalid requirement '--myuser'
Previously I had installed numpy using pip with
python get-pip.py —myuser
and
pip install numpy —myuser
This worked fine, so I am unsure what the problem is here.
This is frustrating as I would like to use python from the terminal rather than from my Windows desktop.
If you want to install to user try the below mentioned command:
pip install --user scipy
Here is the help from pip command:
pip install --help
--user Install to the Python user install directory for
your platform. Typically ~/.local/, or
%APPDATA%\Python on Windows. (See the Python
documentation for site.USER_BASE for full
details.)
You should be able to install it without the use of the --myuser argument.
sudo python3 -m pip install scipy
sudo python3 -m pip install matplotlib
or all in one
sudo python3 -m pip install scipy matplotlib
Try this:
sudo python3 -m pip install scipy matplotlib
I have missing module and I don't know how do I install this. Is there a newer version? I want to do something like: python3.6 -m smtpd -n -c DebuggingServer localhost:1025
Try This.. For Python: 3.6
From pip install Smtpd
pip install smtpd-tls
install the latest version of a module and its dependencies from the
Python Packaging
python -m pip install SomePackage
For Specific Version and Minimum Version Install
python -m pip install SomePackage==3.6.1 # specific version
python -m pip install "SomePackage>=1.0.4" # minimum version
For More Read This : https://docs.python.org/3/installing/index.html
For Smtpd Read This : https://pypi.python.org/pypi/smtpd-tls/0.1
I have a linux machine to which i installed Anaconda.
I am following:
https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html
pip instaltion part.
To be more specific:
which python
gives
/home/user/anaconda2/bin/python
After which i entered:
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl
And after:
sudo pip install --upgrade $TF_BINARY_URL
However,
while trying:
python -c "import tensorflow"
I get an import error:
ImportError: No module named tensorflow
The 'sudo' makes pip install tensorflow outside the env. Try:
pip install --upgrade $TF_BINARY_URL
Just tested this on Ubuntu 14.04 w/ conda env, was able to reproduce (with sudo) and resolve issue (without sudo).
You can also check the "Using Conda" section of tensorflow.org. They list the below:
# Python 2
(tensorflow)$ pip install --ignore-installed --upgrade $TF_BINARY_URL
# Python 3
(tensorflow)$ pip3 install --ignore-installed --upgrade $TF_BINARY_URL
In anaconda, simply do:
for installation
conda install -c conda-forge tensorflow
for update/upgrade
# -f will force the current installation to upgrade
conda update -f -c conda-forge tensorflow
I know how to install external modules using the pip command but for Scikit-learn I need to install NumPy and Matplotlib as well.
How can I install these modules using the pip command?
Old post, but right answer is,
'sudo pip install -U numpy matplotlib --upgrade' for python2 or 'sudo pip3 install -U numpy matplotlib --upgrade' for python3
Using Python 3.4, I run the following from the command line:
c:\python34\python.exe -m pip install package_name
So you would substitute "numpy" and "matplotlib" for 'package_name'