How can i solve the error with installing Jupyter? - python

I'm new to python , i tried to install jupyter by using this command
sudo pip install jupyter
but got
Found existing installation: tornado 3.1.1
Cannot uninstall 'tornado'. It is a distutils installed project and
thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.
I got that there is more than one version of tornado but couldn't fix it
Thanks for any help

do pip uninstall tornado
and then
do pip install tornado==4.0.0

Related

can't install pandas (ERROR: Cannot uninstall 'numpy')

I'm on macOS 10.15 Beta, running a .py script that requires pandas, which is not installed.
When I run sudo python -m pip install --upgrade pandas I receive:
ERROR: Cannot uninstall 'numpy'. It is a distutils installed project
and thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.
If I run sudo pip install pandas I receive the same error.
Help appreciated.
you can try below code.
sudo pip3 uninstall pandas
If still you are not able to uninstall pls share screenshot of error.
I found an alternative method to install pandas, by installing minicondas, and running conda install pandas.
I tried the solutions presented in the other answers, but what worked for me was installing pandas using conda.

pip stuck while "Using cached wheezy.template-0.1.167.tar.gz"

I recently had issues with my local Anaconda version and decided to reinstall it.
I chose the newest version (Anaconda 5.0.1 (Python 3.6)) and started to reinstall all my packages.
There's a problem installing pyimzml package.
To install it, I've tried:
pip install pyimzml
and
pip install git+git://github.com/alexandrovteam/pyimzML.git
Pip always gets stuck during Using cached wheezy.template-0.1.167.tar.gz.
Tried to install wheezy.template as source tarball from PyPI with pip, then it stucks at Processing c:\users\kawu\downloads\wheezy.template-0.1.167.tar.gz.
What can I do?
I solved the problem with the following steps (Windows 10 x64 machine):
Download wheezy.template tarball
Extract it and remove the nthreads=2 within the setup.py code.
Install wheezy.template with the python .\setup.py install command.
Install pyimzml
I tried many ways to install wheezy.template in my machine, like pip by network, pip/easy_install from local file, but the way above was the only way working out. I can not explain why but it works.

Downgrading python package installed locally

In the server that work in (as do many other people) the "global" python has a certain version of a package, say 1.0.0.
I recently used pip to upgrade that to 1.0.2 locally for my user with the pip install --user package==1.0.2, which worked. However, now I want to uninstall my locally installed version and remain with the global one.
I've tried pip uninstall --user package==1.0.2, pip uninstall --user package, and a few other options but nothing seems to work. I always get this error:
Usage:
pip <command> [options]
no such option: --user
I also tried pip install --user package=1.0.0 but now I have both versions installed locally and python uses the most recent.
How can I do what I want?
Apparently this cannot be done with pip directly. I ended up solving it just by removing the package from ~/.local/lib/python3.5/site-packages/. A bit more manual than I was hoping I'd have to do.
The --user option for pip seems to have been removed but is still an option with setuptools.
So if you want to use the --user function what you can do is use pip download which will download the .whl file. You then need to extract the file using wheel unpack. I then ran python setup.py install --user (worked for numpy) and it installed the package to my home directory under .local.
I followed the documentation here.

Install opencv-python under python3 ubuntu 14.04

I want to use opencv under python 3 in Ubunto 14.04. I plan to use the PyCharm IDE to develop my program.
Inside PyCharm I choose, I set:
File/Settings/Project:HelloWorld/Project Interpreter/3.4.3(/usr/bin/python3.4)
Python 3.4.3 is the default version of python in Ubunto 14.04.
Then I try to add opencv-python package:
File/Settings/Project:HelloWorld/Project Interpreter/+ (where you add the package)
and the system gives me this error:
Executed command:
pip install opencv-python
Try to run this command from the system terminal. Make sure that you
use the correct version of 'pip' installed for your Python interpreter located at '/usr/bin/python3.4'.
DEPRECATION: --no-install, --no-download, --build, and --no-clean are deprecated. See https://github.com/pypa/pip/issues/906.
Downloading/unpacking opencv-python
Could not find any downloads that satisfy the requirement opencv-python
Cleaning up...
No distributions at all found for opencv-python
Storing debug log for failure in /root/.pip/pip.log
the error is the same when I run the command from terminal. I believe the problem is related to installing opencv under python3 but I am not sure I know if I can fix it. Please let me know your opinion.
Thanks
The fix is to update your pip and try again. This worked for me.
So, first:
pip install --upgrade pip
after that:
pip install opencv-python
First, you should not use install opencv-python, this is not the official opencv package.
Please, see:
**SOLVED** How to include libgtk2.0-dev and pkg-config in cmake when installing openCV on Ubuntu 16
If you want to install opencv, you can follow this website, that worked for me. You might need to apapt some parts (mainly version numbers, and paths during the cmake process).
I also faced similar issue in the windows and pip upgrade worked for me,
pip install --upgrade pip
and install using below command,
pip install opencv-python
As far as I can see from querying pip (using pip search opencv) there is no package called opencv-python I think the one you're looking for is pyopencv.
this issue appears to be almost identical

Cant upgrade libraries using pip

Whenever I try to upgrade matplotlib using pip install matplotlib --upgrade I get the following
"setuptools must be installed to install from a source distribution"
setuptools is installed and up to date, so I'm lost.
EDIT:
If this adds any context, it started happening after I upgraded distribute
EDIT:
I solved the problem by uninstalling and reinstalling setuptools

Categories