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
Related
If I accidentally run any of the following commands to install or update a package using pip in Python 3.x twice, will it install or update that package twice on the machine?
pip install <package_name>
pip install --upgrade <package_name>
After updating a package twice, it says that:
Requirement already satisfied: appnope in ./.pyenv/versions/3.11.0/lib/python3.11/site-packages (from ipykernel) (0.1.3)"
Does this mean I already updated or installed the package?
Yes, it means you have already installed or upgraded.
The first command installs the package. Because you have not specified a package version with something like pip install package-name==1.0.0, pip will install the package with the latest version.
The second command attempts to upgrade the same package. Because it is installed with the latest version, there is nothing to upgrade. pip will not reinstall packages unless you ask it to.
pip install --upgrade --force-reinstall <package-name>
pip will also attempt to install dependencies for your packages that may be required for the package you requested.
Requirement already satisfied: appnope in ./.pyenv/versions/3.11.0/lib/python3.11/site-packages (from ipykernel) (0.1.3)"
I installed the universal2 installation of python 3.9.1 from python.org, and the latest version of pip. I am running into an issue where if I try to install common packages (like numpy or pandas) I get an error message stating "ERROR: Could not build wheels for bumpy which use PEP 517 and cannot be installed directly". Is there any workaround? Surely there is a way to install a common package like numpy to run on Apple Silicon. Thanks for the help.
This often indicates that you have out-of-date packages. Do these upgrades:
pip install --upgrade pip setuptools wheel
and then try again.
I am trying to build my own Python package (installable by pip) using the twine package. This is all going well right up until the point where I try to pip install my actual package (so after uploading to PyPi).
So I first run:
python3 setup.py sdist bdist_wheel
In which my setup.py install_requires list looks like this:
install_requires=[
'jupyter_kernel_gateway==2.4.0',
'pandas==1.0.2',
'numpy==1.18.1',
'azure-storage-blob==2.0.1',
'azure-datalake-store==0.0.48',
'psycopg2-binary==2.8.4',
'xlsxwriter==1.2.6',
'SQLAlchemy==1.3.12',
'geoalchemy2==0.6.3',
'tabulate==0.8.2',
'pyproj==1.9.6',
'geopandas==0.4.0',
'contextily==0.99.0',
'matplotlib==3.0.2',
'humanize==0.5.1',
'ujson==1.35',
'singleton-decorator==1.0.0',
'dataclasses==0.6',
'xlrd==1.2.0'],
In my understanding, these install_requires would be installed by pip when installing my own package.
After this I run
python3 -m twine upload --repository testpypi dist/*
To actually upload my package to PyPi. However, when pip installing my package, I get errors that say there are no versions that satisfy the requirements for a lot of the listed requirements. E.g.: ERROR: Could not find a version that satisfies the requirement psycopg2-binary==2.8.4
When I manually install these packages (e.g. pip install psycopg2-binary==2.8.4), they do get installed.
Is there any way to make the pip install of my package actually install the install_requires requirement list succesfully?
You didn't show how your pip install-ing your package, but I'm guessing you're using something like:
pip install your_project --index-url https://test.pypi.org/simple
The issue is that TestPyPI doesn't contain copies of your dependencies that exist on PyPI. For example:
Exists: https://pypi.org/project/psycopg2-binary/2.8.4/
Does not exist: https://test.pypi.org/project/psycopg2-binary/2.8.4/
You can configure pip to fall back on TestPyPI when a package is missing instead by specifying --extra-index-url instead:
pip install your_project --extra-index-url https://test.pypi.org/simple
I want to use pip3 to install python package to /usr/lib/python3/dist-packages. For example, I want to install xgboost, so I try
sudo -H pip3 install -t /usr/lib/python3/dist-packages xgboost
The problem is such command also install dependencies numpy and scipy even though they already exist in /usr/lib/python3/dist-packages, and when I use
sudo pip3 uninstall xgboost
it complain xgboost is not installed.
What I want:
pip3 just install dependencies when they are not exist in /usr/lib/python3/dist-packages
pip3 uninstall xgboost can work
Any help? Thanks
I’m new to python and I got some problem when trying to install QISKit.
First, I was using pip install qiskit on cmd, but it showed an error
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
I searched on internet and pip install scipy separately. It worked
Collecting scipy
Using cached scipy-1.0.0-cp36-none-win32.whl
Requirement already satisfied: numpy>=1.8.2 in
d:\programming\python\lib\site-packages (from scipy)
Installing collected packages: scipy
Successfully installed scipy-1.0.0
Then I tried pip install qiskit again. It showed an error:
Found existing installation: scipy 1.0.0
Uninstalling scipy-1.0.0:
Successfully uninstalled scipy-1.0.0
Running setup.py install for scipy ... error
……
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Rolling back uninstall of scipy
So I used the second way:
git clone https://github.com/QISKit/qiskit-sdk-py
cd qiskit-sdk-py
then
pip install -r requirements.txt
again
Installing collected packages: scipy, sympy
Found existing installation: scipy 1.0.0
Uninstalling scipy-1.0.0:
Successfully uninstalled scipy-1.0.0
Running setup.py install for scipy ... error
……
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
----------------------------------------
Rolling back uninstall of scipy
how can I solve this and add QISKit to python lib?
reference:
https://github.com/QISKit/qiskit-sdk-py/blob/master/doc/install.rst#3.1-Setup-the-environment
Installing scipy, at least the version currently required by QISKit, on Windows requires that you have a couple of different compilers installed, which you probably don't. I recommend you install Anaconda. If you download the full Anaconda package, it includes the appropriate scipy binary, or alternatively you can do conda install scipy=0.19 before you do pip install qiskit.
I think that should fix your current issue but feel free to reach out with any others -- I'll be happy to help. You can also find more documentation at qiskit.org, github.com/QISKit/qiskit-sdk-py, and on the IBM Q experience community forums.
Cheers,
Doug