How to overcome Marisol ReportLab installation error? - python-3.x

An attempt to install Marisol on OS X 10.15:
pip3 install marisol | tee install_marisol_log.txt
returned:
Building wheel for reportlab (setup.py): finished with status
'error'
The complete install (error log is) is posted: https://pastebin.com/raw/V9SZeyDM
Marisol dependent libraries were installed:
pip3 install reportlab
pip3 install pypdf2
Marisol dependent libraries were verified:
pip3 install reportlab
DEPRECATION: Configuring installation scheme
with distutils config files is deprecated and will no longer work in
the near future. If you are using a Homebrew or Linuxbrew Python,
please see discussion at
https://github.com/Homebrew/homebrew-core/issues/76621
Requirement already satisfied: reportlab in /usr/local/lib/python3.9/site-packages
(3.6.10)
Requirement already satisfied: pillow>=9.0.0 in /usr/local/lib/python3.9/site-packages (from reportlab) (9.1.1)
DEPRECATION: Configuring installation scheme with distutils config
files is deprecated and will no longer work in the near future. If you
are using a Homebrew or Linuxbrew Python, please see discussion at
https://github.com/Homebrew/homebrew-core/issues/76621 WARNING: There
was an error checking the latest version of pip.
The log seems to indicate that marisol installer removed reportlab-3.6.10, failed to install its preferred version of reportlab and rolled back o reportlab-3.6.10:
Installing collected packages: reportlab, marisol
Attempting uninstall: reportlab
Found existing installation: reportlab 3.6.10
Uninstalling reportlab-3.6.10:
Successfully uninstalled reportlab-3.6.10
Running setup.py install for reportlab: started
Running setup.py install for reportlab: finished with status 'error'
Rolling back uninstall of reportlab
Question: What are the steps / strategy to remedy these errors?

Related

unable to make a python3 wheel because bdist_wheel is an invalid command

NOTE: the solution was to update my version of wheels using this command:
pip install -U pip wheel setuptools
The original question
I am trying to make a wheel in python3, so I followed this tutorial:
https://medium.com/swlh/beginners-guide-to-create-python-wheel-7d45f8350a94
However, when I ran the command python3 setup.py bdist_wheel I got this error:
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
I then checked out this answer on stack overflow:
How to fix `error: invalid command 'bdist_wheel'`?
and tried re-installing wheel like so: pip3 install wheel, however I got this message:
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Requirement already satisfied: wheel in /usr/local/lib/python3.9/site-packages (0.37.0)
I tried running python3 setup.py bdist_wheel again, however it still gave the same error, so I then checked the page: https://github.com/Homebrew/homebrew-core/issues/76621 that the above message recommended to me, however it told me there is nothing for me to do at this time:
If you have been directed here from a pip warning, you don't need to take any action at this stage. Nothing is currently expected to break until Python 3.12, and a full solution will be implemented well before then.
At this point, I am unsure where to go next to resolve my problem. To be clear, my goal is to make a python3 wheel. At the moment, I want in particular to make a wheel for PyPDF4: https://github.com/claird/PyPDF4, however I would more generally like to be able to make wheels for any package, and the problem I am having doesn't seem to have anything to do with this particular package, so this additional information should be unnecessary.
In case this is relevant, I am on macos monterey 12.0.1
Regarding venv:
I created a virtualenv with this command: virtualenv . and then activated it with source bin/activate. I then ran python3 setup.py bdist_wheel to see if I could use the original command suggested to me in the tutorial, however again, I got the same error as is given at the top of this post. So it seems to me that making a venv doesn't fix the problem.
Installing wheel into the venv
Here is the result of my attempt to install wheel into the virtual environment prior to building the wheel. As can be seen below, it also doesn't work
➜ test2 git:(master) git pull https://github.com/claird/PyPDF4
remote: Enumerating objects: 2516, done.
remote: Total 2516 (delta 0), reused 0 (delta 0), pack-reused 2516
Receiving objects: 100% (2516/2516), 3.56 MiB | 1.75 MiB/s, done.
Resolving deltas: 100% (1661/1661), done.
From https://github.com/claird/PyPDF4
* branch HEAD -> FETCH_HEAD
➜ test2 git:(master) virtualenv .
created virtual environment CPython3.9.9.final.0-64 in 323ms
creator CPython3Posix(dest=/Users/.../test2, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/.../virtualenv)
added seed packages: pip==21.3.1, setuptools==59.2.0, wheel==0.37.0
activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
➜ test2 git:(master) ✗ source bin/activate
(test2) ➜ test2 git:(master) ✗ pip install wheel
Requirement already satisfied: wheel in ./lib/python3.9/site-packages (0.37.0)
(test2) ➜ test2 git:(master) ✗ pip3 install wheel
Requirement already satisfied: wheel in ./lib/python3.9/site-packages (0.37.0)
(test2) ➜ test2 git:(master) ✗ python3 setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
(test2) ➜ test2 git:(master) ✗
Small note
#Pavel Hamerník, Thanks for all the help so far. If you're tired of dealing with this question, just say so and I'll accept your answer as is. I have successfully accomplished my goal of making a wheel, so at this point I am simply pursuing this in an attempt to make a more complete post here on stackoverflow. If you feel similarly to me that this is worth while, then we should continue working to find out what exactly the problem is. Thanks again
Updating to the newest version
I ran pip3 install -U pip wheel setuptools and got this message:
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (21.3.1)
Requirement already satisfied: wheel in /usr/local/lib/python3.9/site-packages (0.37.0)
Collecting wheel
Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (59.0.1)
Collecting setuptools
Downloading setuptools-60.1.0-py3-none-any.whl (952 kB)
|████████████████████████████████| 952 kB 7.3 MB/s
Installing collected packages: wheel, setuptools
Attempting uninstall: wheel
Found existing installation: wheel 0.37.0
Uninstalling wheel-0.37.0:
Successfully uninstalled wheel-0.37.0
Attempting uninstall: setuptools
Found existing installation: setuptools 59.0.1
Uninstalling setuptools-59.0.1:
Successfully uninstalled setuptools-59.0.1
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
awsebcli 3.19.4 requires six<1.15.0,>=1.11.0, but you have six 1.15.0 which is incompatible.
Successfully installed setuptools-60.1.0 wheel-0.37.1
I then ran python3 setup.py bdist_wheel and it worked!
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/pypdf
copying pypdf/_version.py -> build/lib/pypdf
copying pypdf/pagerange.py -> build/lib/pypdf
copying pypdf/generic.py -> build/lib/pypdf
copying pypdf/__init__.py -> build/lib/pypdf
copying pypdf/pdf.py -> build/lib/pypdf
copying pypdf/xmp.py -> build/lib/pypdf
copying pypdf/utils.py -> build/lib/pypdf
copying pypdf/filters.py -> build/lib/pypdf
copying pypdf/merger.py -> build/lib/pypdf
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running install
running install_lib
creating build/bdist.macosx-12-x86_64
creating build/bdist.macosx-12-x86_64/wheel
creating build/bdist.macosx-12-x86_64/wheel/pypdf
running install_egg_info
running egg_info
creating pypdf4.egg-info
writing manifest file 'pypdf4.egg-info/SOURCES.txt'
writing manifest file 'pypdf4.egg-info/SOURCES.txt'
Copying pypdf4.egg-info to build/bdist.macosx-12-x86_64/wheel/pypdf4-1.27.0-py3.9.egg-info
running install_scripts
The question was answered in the comments. The solution was to use pip wheel . -w dist, or to create a virtual environment.
My best guess is you have some problems with your system packages. Maybe multiple versions of python3. Your pip3 command could point to another version of python3 that's why it probably failed.
pip wheel creates a temporary virtual environment where it builds the wheel. It copies all files to the temp directory, so if you have a lot of files it can be slower then the build.
I would suggest always creating a virtual environment for new projects. You'll have then isolated environment so you can have different package versions for different projects.
Edit:
According to the update of the question and latest comments I think your wheel or setuptools wasn't up-to-date. Even the tutorial you linked has this mentioned with a large font.
Ensure pip, setuptools and wheel packages are up to date
https://packaging.python.org/en/latest/tutorials/installing-packages/#ensure-pip-setuptools-and-wheel-are-up-to-date
Which was done with pip install -U pip wheel setuptools and after that you mentioned that the building now works.
As said before pip wheel setups the virtual environment with the latest packages, so there wasn't a problem using it. If you look on verbose output of pip wheel it uses setup.py bdist_wheel internally but wraps the command so it builds in an isolated environment.

Is there a go-to way to install CuPy on Windows 10 right now?

I can see that the installation guide:
https://docs.cupy.dev/en/stable/install.html
is quite outdated and a note on the Github release page of v9.0.0a2:
https://github.com/cupy/cupy/releases/tag/v9.0.0a2
states that the older version supporting CUDA v11.1 did not work in the first place and all wheels have been removed from PyPi as a response. Trying to install CuPy with an updated pip, none of the wheels are back up. Is there still a version (for any CUDA version for that matter) that works on Windows then? Can I build the newer v9.0.0b1 on Windows from source maybe?
C:\Windows\system32>python -m pip install -U setuptools pip
Requirement already satisfied: setuptools in c:\users\c\appdata\local\programs\python\python38-32\lib\site-packages (51.1.2)
Requirement already satisfied: pip in c:\users\c\appdata\local\programs\python\python38-32\lib\site-packages (20.3.3)
C:\Windows\system32>pip install cupy-cuda111
ERROR: Could not find a version that satisfies the requirement cupy-cuda111
ERROR: No matching distribution found for cupy-cuda111

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

upgrade ply package fails

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?

configure qiskit on win10 error:numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

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

Resources