採用 uv 取代傳統的 pip、venv、poetry 等工具,用於快速、可靠的 Python 套件管理與虛擬環境建置。
🔹 uv 是什麼?
uv 是一個專注於 Python 的超高速工具鏈,集成了:
- 套件管理(取代
pip/poetry) - 虛擬環境管理(取代
venv/ 部分 conda 功能) - Python 版本管理(類似
pyenv) - 可重現環境(自動生成鎖定檔
uv.lock)
About 3 min
採用 uv 取代傳統的 pip、venv、poetry 等工具,用於快速、可靠的 Python 套件管理與虛擬環境建置。
uv 是一個專注於 Python 的超高速工具鏈,集成了:
pip / poetry)venv / 部分 conda 功能)pyenv)uv.lock)有的字元不是utf8
忽略錯誤亂碼
f.read().decode('utf-8','ignore')
when using onnxruntime-gpu the following error occurs, and it will
app-1 | 2025-01-10 00:39:47.087340896 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
app-1 |
app-1 | 2025-01-10 00:39:47.087371059 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:993 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
app-1 | 2025-01-10 00:39:48.231333495 [E:onnxruntime:Default, provider_bridge_ort.cc:1862 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1539 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn_adv.so.9: cannot open shared object file: No such file or directory
app-1 |
app-1 | 2025-01-10 00:39:48.231363512 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:993 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
try to install xformers on windows:
pip install xformers --no-cache-dir
when pip install opencv-python throw error like this:
...
...
Working directory:
C:\Users\XXXXXX\AppData\Local\Temp\pip-install-kzx3vj4c\opencv-python_c2ee9d023a4a45e584477071884f30ac\_skbuild\win-amd64-3.6\cmake-build
Please see CMake's output for more information.
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
auto-py-to-exe 是一個用來將 Python 程式轉換為可執行檔(.exe)的工具,它提供了一個易於使用的圖形化界面。以下是使用 auto-py-to-exe 的步驟教學:
auto-py-to-exe首先,您需要安裝 auto-py-to-exe。在命令提示符(或終端)中輸入以下指令來安裝:
pip install auto-py-to-exe