Closed bw7715 closed 3 weeks ago
Inside torchmetrics module is a check if matplotlib module is available.
\torchmetrics\utilities\plot.py
...
from torchmetrics.utilities.imports import _LATEX_AVAILABLE, _MATPLOTLIB_AVAILABLE, _SCIENCEPLOT_AVAILABLE
if _MATPLOTLIB_AVAILABLE:
import matplotlib
import matplotlib.axes
import matplotlib.pyplot as plt
...
VENV:
.\python.exe -m pip list
Package Version
------------------- -----------
contourpy 1.3.0
cx_Freeze 7.2.3
cx_Logging 3.2.1
cycler 0.12.1
filelock 3.16.1
fonttools 4.54.1
fsspec 2024.9.0
importlib_metadata 8.5.0
importlib_resources 6.4.5
Jinja2 3.1.4
kiwisolver 1.4.7
lief 0.15.1
lightning-utilities 0.11.8
MarkupSafe 3.0.1
matplotlib 3.9.2
mpmath 1.3.0
networkx 3.2.1
numpy 1.26.4
packaging 24.1
pillow 11.0.0
pip 22.0.4
pyparsing 3.2.0
python-dateutil 2.9.0.post0
setuptools 75.1.0
six 1.16.0
sympy 1.13.3
tomli 2.0.2
torch 2.4.1
torchmetrics 1.4.2
typing_extensions 4.12.2
zipp 3.20.2
You can test the PR with:
pip install --no-cache --pre git+https://github.com/marcelotduarte/cx_Freeze.git@refs/pull/2634/head --force
If using uv:
uv pip install --no-cache --pre git+https://github.com/marcelotduarte/cx_Freeze.git@refs/pull/2634/head --force-reinstall
I try to test with a:
pip install --no-cache --pre git+https://github.com/marcelotduarte/cx_Freeze.git@refs/pull/2634/head --force
but with a command:
%FREEZER_EXE_PATH% build -O1 -O2 --include-msvcr --build-exe="%TARGET_DIR%" --target-name=%TARGET_NAME% --packages=%PACKAGES% --excludes=%EXCLUDES% --script=%PROJECT_SOURCE_PY_PATH%
I get an error during freezing process:
running build
running build_exe
error: [Errno 22] Invalid argument
with cx_Freeze==7.2.0 I don't have this problem.
With 7.2.1 and 7.2.2 I also don't have this issue.
But the problem appeared in version 7.2.3. Has something changed in the use of parameters?
I redid the tests, tested with torch 2.5.0 and 2.4.1
I also tested, with matplotlib installed, versions 7.2.1, 7.2.2 and 7.2.3. They all failed.
I tested with the PR and the main version and both passed.
So I suggest:
pip uninstall cx_Freeze
pip install --no-cache --pre git+https://github.com/marcelotduarte/cx_Freeze.git@main
Note: error: [Errno 22] Invalid argument
is a OSError.
Has something changed in the use of parameters?
No. No change in command line parameters. Argument refers to the argument of a function, for example: https://stackoverflow.com/questions/25584124/oserror-errno-22-invalid-argument-when-use-open-in-python
Release 7.2.4 is out! Documentation
Please give me feedback.
Prerequisite When try to exclude 'matlotlib' module from final project an error occurs.
Describe the bug
To Reproduce project.py
freeze.bat
requirements.txt
But if I uninstall matplotlib from venv before freezing the project works.
Desktop (please complete the following information):