upgrade ply package fails - python-3.x

I want to upgrade ply so I'm running -
pip install ply --upgrade
and I get the error (marked with **) -
Collecting ply
Using cached https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl
Installing collected packages: ply
Found existing installation: ply 3.8
**Cannot uninstall 'ply'. 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.**
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
How do I solve this?

Related

pip install Pillow fails

I can't install pillow on my computer anymore. When I tried pip install Pillow, I get warnings and then 2 errors :
ERROR: Could not find a version that satisfies the requirement pillow (from versions: none)
ERROR: No matching distribution found for pillow
I saw a lot of people in the same case and I tried all the solutions but nothing worked. Do you have any idea on how to re-install pillow?
Install with whatever you use to run Python, not pip directly. For example:
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow
See https://snarky.ca/why-you-should-use-python-m-pip/ for more details.

Can't install PymuPDF although python Libary have PymuPDF

I tried to install PyMuPDF on Python 3.9 when first I installed by pip install PymuPDF and re-checked by pip list like this"
But when I imported PyMuPDF:
ModuleNotFoundError: No module named 'PyMuPDF'
Next, I tried to install PymuPDF from doc, it said I need install MuPDF first, and install with Wheel, I tried both:
pip install C:\Users\Admin\Desktop/PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl and pip install PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl but reviced error:
yMuPDF-1.19.6-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.
What should i do to install PyMuPDF, thank you all.
PyMuPDF is available with a wheel under all Windows versions - you should have no problem at all.
But please follow this procedure:
Make sure your pip is the current one. This ensures that any changes in supported platform tags are known to pip.
Then install PyMuPDF.
So overall
py -3.10 -m pip install -U pip
py -3.10 -m pip install -U pymupdf
This should simply work!
In your script however you must do import fitz - this is the top-level name of the package.

unable to install tensorflow and wrapt obstructing

I got the solution for the same issue from this Stackoverflow earlier(couple of months back) but I forgot it.
The solution should be like this: download the wrapt package from GitHub and placed the same in c: drive \ user profile location \wrapt.
while installing the tensorflow package, wrapt obstructing it
pip install tensorflow
error while installing the tensorflow
Installing collected packages: wrapt, tensorflow
Found existing installation: wrapt 1.10.11
ERROR: Cannot uninstall 'wrapt'. 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.
In your case, you can either uninstall and reinstall wrap or simply upgrade.
first uninstall wrapt:
pip uninstall wrapt
Then reinstall:
pip install wrapt
Or simply (then you don't have to install and uninstall):
pip install wrapt --upgrade --ignore-installed
Then:
pip install tensorflow

Not able to install scipy, matplotlob and scikit-learn using pip 1.5.6

Trying to install
pip install numpy
pip install scipy
pip install matplotlib
pip install scikit-learn
It failed with scipy, matplotlib and scikit-learn.
(from https://pypi.python.org/simple/scipy/) because it is not compatible with this Python
Skipping
My python version is 3.4 and pip version is 1.5.6
please help me install those above package
With pip 1.5.6 it will try to compile those projects from source which requires a lot of system dependencies (especially for scipy, you need gfortran and an optimized BLAS/LAPACK implementation).
I assume you are using the system provided version of pip under Linux. I would recommend to either use the latest version of pip (8.1 or later) in an a virtualenv (to avoid replacing the files of the system installed version of pip). Then you should be able to install manylinux wheels which do not require the compilation step.
Alternatively you can install miniconda and install those packages with the conda command line instead of pip.
Forget shitty pip, which is flawed beyond repair (static linking etc.)
Download IPython with the Anaconda Suite.... https://www.continuum.io/downloads
It brings most of the needed modules for scientific computing (as it is a crappy task if you have to download stuff to site-packages and run python setup.py install 3781 times..)
I wrote several programs using matplotlib, scipy, numpy etc with it..
Moreover it sports module package manager (comparable to Synaptic on Ubuntu..) if you are to lazy for the above mentioned task (and you are..).
Greets Dr. Cobra

How to upgrade yolk to yolk3k in a virtual env?

I have just started using virtualenv from this tutorial, where it uses yolk to list the packages installed in the virtualenv, but yolk by default is for Python 2, so I decided to upgrade with an extension for Python 3, my current version, with the following command:
pip3 install --upgrade yolk3k
It works when I am not in the virtualenv that I called virt0, but if I am on it, it gives me the error it was giving me before upgrading it to the Python 3 version.
print " %s %s (%s)" % (project_name, dist.version,
^
SyntaxError: invalid syntax
When I tried to install yolk in the virt0, the output was the following:
Searching for yolk
Best match: yolk 0.4.3
Processing yolk-0.4.3-py3.4.egg
yolk 0.4.3 is already the active version in easy-install.pth
Installing yolk script to /Users/user/Desktop/virt_env/virt0/bin
Using /Users/user/Desktop/virt_env/virt0/lib/python3.4/site-packages/yolk-0.4.3-py3.4.egg
Processing dependencies for yolk
Finished processing dependencies for yolk
In /Users/user/Desktop/virt_env/virt0/bin, I have this:
activate pip3
activate.csh pip3.4
activate.fish python
activate_this.py python3
easy_install python3.4
easy_install-3.4 yolk
pip
which confirms that yolk was installed, but how can I update it also to yolk3k in virt0?
If I try to install yolk3k with the following command:
pip3 install --upgrade yolk3k
inside /Users/user/Desktop/virt_env/virt0/bin, it outputs:
Requirement already up-to-date: yolk3k in /Users/user/Desktop/virt_env/virt0/lib/python3.4/site-packages
but it still gives me the error I cited above.
Delete the virtualenv, recreate it with Python 3 as the interpreter and install all dependencies for Python 3 (such as yolk3k). The problem seems to come from the fact that you're going from a 2.x to a 3.x environment even though the virtualenv originally wasn't.
That's not the intended way of using a virtualenv - a virtualenv should be tied to one particular Python version (e.g., 2.7 or 3.4) with all dependencies installed for that version. So you should throw away the virtualenv and rebuild it entirely using 3.x dependencies. That should resolve any conflicting language issues.

Resources