File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ using namespace pybind11::literals; // to bring in the `_a` literal
1616#include < QThread>
1717#include < iostream>
1818
19+ #ifdef _WIN32
20+ #include < windows.h>
21+ #endif
22+
1923namespace shapeworks {
2024
2125// ---------------------------------------------------------------------------
@@ -207,6 +211,21 @@ bool PythonWorker::init() {
207211
208212 qputenv (" PATH" , path.toUtf8 ());
209213 SW_LOG (" Setting PATH for Python to: " + path.toStdString ());
214+
215+ // Python 3.8+ requires explicit DLL directory registration
216+ // PATH environment variable is no longer used for DLL search
217+ SetDefaultDllDirectories (LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_USER_DIRS);
218+
219+ // Add the Library\bin directory where conda keeps DLLs like libexpat.dll
220+ QString library_bin = python_home + " /Library/bin" ;
221+ AddDllDirectory (library_bin.toStdWString ().c_str ());
222+
223+ // Also add the DLLs directory
224+ QString dlls_dir = python_home + " /DLLs" ;
225+ AddDllDirectory (dlls_dir.toStdWString ().c_str ());
226+
227+ // And the base python home
228+ AddDllDirectory (python_home.toStdWString ().c_str ());
210229 }
211230#endif // ifdef _WIN32
212231
Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ ROOT=`pwd`
3636
3737BUILD=" /c/build"
3838CONDA_LOC=" /c/Miniconda/envs/shapeworks"
39- cp ${CONDA_LOC} /python* .dll ${CONDA_LOC} /Library/bin/zlib.dll ${CONDA_LOC} /Library/bin/tbb12.dll ${CONDA_LOC} /Library/bin/zstd.dll ${CONDA_LOC} /Library/bin/libpng16.dll ${CONDA_LOC} /Library/bin/half.dll ${CONDA_LOC} /Library/bin/boost_filesystem.dll ${CONDA_LOC} /Library/bin/spdlog.dll ${CONDA_LOC} /Library/bin/* ffi* .dll ${CONDA_LOC} /Library/bin/libbz2.dll $BUILD /bin/Release
39+
40+ ls -la ${CONDA_LOC} /Library/bin
41+
42+ cp ${CONDA_LOC} /python* .dll ${CONDA_LOC} /Library/bin/zlib.dll ${CONDA_LOC} /Library/bin/tbb12.dll ${CONDA_LOC} /Library/bin/zstd.dll ${CONDA_LOC} /Library/bin/libpng16.dll ${CONDA_LOC} /Library/bin/half.dll ${CONDA_LOC} /Library/bin/boost_filesystem.dll ${CONDA_LOC} /Library/bin/spdlog.dll ${CONDA_LOC} /Library/bin/* ffi* .dll ${CONDA_LOC} /Library/bin/libbz2.dll ${CONDA_LOC} /Library/bin/libssl-3-x64.dll ${CONDA_LOC} /Library/bin/libcrypto-3-x64.dll ${CONDA_LOC} /Library/bin/pcre2-16.dll $BUILD /bin/Release
4043
4144# install visual studio redistributables
4245WIN_DIR=" /c/Windows/system32"
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ call conda config --add channels anaconda
1111call conda config --add channels conda-forge
1212
1313REM install shapeworks deps
14- call conda create --yes --name %CONDAENV% python=3.9.13 pip=22.1.2 openssl== 1.1.1w || goto :error
14+ call conda create --yes --name %CONDAENV% python=3.12 pip=24.3.1 openssl== 0.3.30 || goto :error
1515call conda activate %CONDAENV%
1616
1717REM reactivate shapeworks environment
@@ -21,10 +21,10 @@ call conda activate %CONDAENV%
2121call python -m pip install -r python_requirements.txt || goto :error
2222
2323REM install ptorch using light-the-torch
24- call ltt install torch== 1.11.0 || goto :error
24+ call ltt install torch== 2.2.2 || goto :error
2525
2626REM different versions of open3d for different OSes, so we install it manually here
27- call pip install open3d== 0.17 .0 || goto :error
27+ call pip install open3d== 0.19 .0 || goto :error
2828
2929call pip install Python/DatasetUtilsPackage.tar.gz || goto :error
3030call pip install Python/DocumentationUtilsPackage.tar.gz || goto :error
You can’t perform that action at this time.
0 commit comments