Skip to content

Methods for install causing issues since numpy 2.0 released. #8

@lwade-biomech

Description

@lwade-biomech

Hi Antoine,

Thanks for putting this package together. Unfortunately I have had some issues with installing and running this tutorial due to the recent release of Numpy 2.0. The Pip install and requirements .txt is causing problems as instead of keeping numpy at version 1.2 for OpenSim, it is upgrading to 2.0, which is forcing everything else to then upgrade to accomodate this change. I had a few trial and error attempts but managed to get past the version errors by first installing OpenSim, then Casadi, then using conda install for most things and for those that couldnt use that, making sure I installed a version that could work with Numpy 1.2 (I did not install Numpy again as it came with OpenSim). I am now dealing with CMake version issues although it appears the Hamner_modified_scaled .dll and .cpp are being created, but the script is not running without errors? I have copied below the errors for CMake and my package list and versions below.

It should be noted that this will need to be adjusted for OpenSimAD Install instructions as well.
Cheers, Logan


`runfile('C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/main.py', wdir='C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD')
Traceback (most recent call last):

File ~\AppData\Local\miniconda3\envs\predsim_tutorial\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\users\lw2175\dropbox\university\githubclones\opensimad\main.py:61
generateExternalFunction(pathOpenSimModel, pathModelFolder, pathID,

File ~\Dropbox\University\GitHubClones\opensimAD\utilities.py:562 in generateExternalFunction
buildExternalFunction(outputFilename, outputDir, 3*nCoordinates)

File ~\Dropbox\University\GitHubClones\opensimAD\utilities.py:787 in buildExternalFunction
shutil.rmtree(path_external_functions_filename_build)

File ~\AppData\Local\miniconda3\envs\predsim_tutorial\lib\shutil.py:759 in rmtree
return _rmtree_unsafe(path, onerror)

File ~\AppData\Local\miniconda3\envs\predsim_tutorial\lib\shutil.py:624 in _rmtree_unsafe
_rmtree_unsafe(fullname, onerror)

File ~\AppData\Local\miniconda3\envs\predsim_tutorial\lib\shutil.py:633 in _rmtree_unsafe
onerror(os.rmdir, path, sys.exc_info())

File ~\AppData\Local\miniconda3\envs\predsim_tutorial\lib\shutil.py:631 in _rmtree_unsafe
os.rmdir(path)

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExternalFunctionHamner_modified_scaled\CMakeFiles'

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (10.5s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/build-ExpressionGraphHamner_modified_scaled
MSBuild version 17.10.4+10fbfbf2e for .NET Framework

Checking Build System
Building Custom Rule C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/buildExpressionGraph/windows/CMakeLists.txt
Hamner_modified_scaled.cpp
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\Component.h(2123,9): warning C4068: unknown pragma 'clang' [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\Component.h(2124,9): warning C4068: unknown pragma 'clang' [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\Component.h(2127,9): warning C4068: unknown pragma 'clang' [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\PropertyDblVec.h(145,30): warning C4477: 'sprintf' : format string '%g' requires an argument of type 'double', but variadic argument 1 has type 'T' [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\PropertyDblVec.h(145,30): warning C4477: with [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\PropertyDblVec.h(145,30): warning C4477: [ [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\PropertyDblVec.h(145,30): warning C4477: T=osim_double_adouble [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\PropertyDblVec.h(145,30): warning C4477: ] [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\include\OpenSim\Common\PropertyDblVec.h(145,17): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\opensimAD-install\windows\sdk\Simbody\include\SimTKcommon\internal\Exception.h(120,14): warning C4101: 'buf': unreferenced local variable [C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\Hamner_modified_scaled.vcxproj]
Hamner_modified_scaled.vcxproj -> C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExpressionGraphHamner_modified_scaled\RelWithDebInfo\Hamner_modified_scaled.exe
Building Custom Rule C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/buildExpressionGraph/windows/CMakeLists.txt
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- Configuring done (0.1s)
-- Generating done (0.1s)
-- Build files have been written to: C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/build-ExternalFunctionHamner_modified_scaled
MSBuild version 17.10.4+10fbfbf2e for .NET Framework

Checking Build System
Building Custom Rule C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/buildExternalFunction/CMakeLists.txt
foo_jac.c
Hamner_modified_scaled.vcxproj -> C:\Users\lw2175\Dropbox\University\GitHubClones\opensimAD\build-ExternalFunctionHamner_modified_scaled\RelWithDebInfo\Hamner_modified_scaled.dll
Building Custom Rule C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/buildExternalFunction/CMakeLists.txt
-- Install configuration: "RelWithDebInfo"
-- Up-to-date: C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/install-ExternalFunctionHamner_modified_scaled/lib/Hamner_modified_scaled.lib
-- Installing: C:/Users/lw2175/Dropbox/University/GitHubClones/opensimAD/install-ExternalFunctionHamner_modified_scaled/bin/Hamner_modified_scaled.dll`

Name Version Build Channel
alabaster 0.7.16 py39haa95532_0
arrow 1.2.3 py39haa95532_1
astroid 2.14.2 py39haa95532_0
asttokens 2.0.5 pyhd3eb1b0_0
atomicwrites 1.4.0 py_0
attrs 23.1.0 py39haa95532_0
autopep8 2.0.4 pyhd3eb1b0_0
babel 2.11.0 py39haa95532_0
backcall 0.2.0 pyhd3eb1b0_0
bcrypt 3.2.0 py39h2bbff1b_1
beautifulsoup4 4.12.3 py39haa95532_0
binaryornot 0.4.4 pyhd3eb1b0_1
black 24.4.2 py39haa95532_0
blas 1.0 mkl
bleach 4.1.0 pyhd3eb1b0_0
bottleneck 1.3.5 py39h080aedc_0
brotli 1.0.9 h2bbff1b_8
brotli-bin 1.0.9 h2bbff1b_8
brotli-python 1.0.9 py39hd77b12b_8
bzip2 1.0.8 h2bbff1b_6
ca-certificates 2024.3.11 haa95532_0
casadi 3.6.5 pypi_0 pypi
certifi 2024.6.2 py39haa95532_0
cffi 1.16.0 py39h2bbff1b_1
chardet 4.0.0 py39haa95532_1003
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 py39haa95532_0
cloudpickle 2.2.1 py39haa95532_0
cmake 3.26.4 h693b641_0
colorama 0.4.6 py39haa95532_0
comm 0.2.1 py39haa95532_0
contourpy 1.2.0 py39h59b6b97_0
cookiecutter 2.6.0 py39haa95532_0
cryptography 42.0.5 py39h89fc84f_1
cycler 0.11.0 pyhd3eb1b0_0
debugpy 1.6.7 py39hd77b12b_0
decorator 5.1.1 pyhd3eb1b0_0
defusedxml 0.7.1 pyhd3eb1b0_0
diff-match-patch 20200713 pyhd3eb1b0_0
dill 0.3.8 py39haa95532_0
docstring-to-markdown 0.11 py39haa95532_0
docutils 0.18.1 py39haa95532_3
exceptiongroup 1.2.0 py39haa95532_0
executing 0.8.3 pyhd3eb1b0_0
flake8 7.0.0 py39haa95532_0
fonttools 4.51.0 py39h2bbff1b_0
freeglut 3.4.0 hd77b12b_0
freetype 2.12.1 ha860e81_0
icc_rt 2022.1.0 h6049295_2
icu 73.1 h6c2663c_0
idna 3.7 py39haa95532_0
imagesize 1.4.1 py39haa95532_0
importlib-metadata 7.0.1 py39haa95532_0
importlib_metadata 7.0.1 hd3eb1b0_0
importlib_resources 6.1.1 py39haa95532_1
inflection 0.5.1 py39haa95532_0
intel-openmp 2023.1.0 h59b6b97_46320
intervaltree 3.1.0 pyhd3eb1b0_0
ipykernel 6.28.0 py39haa95532_0
ipython 8.15.0 py39haa95532_0
isort 5.13.2 py39haa95532_0
jaraco.classes 3.2.1 pyhd3eb1b0_0
jedi 0.18.1 py39haa95532_1
jellyfish 1.0.1 py39h36a85e1_0
jinja2 3.1.4 py39haa95532_0
joblib 1.4.2 py39haa95532_0
jpeg 9e h2bbff1b_1
jsonschema 4.19.2 py39haa95532_0
jsonschema-specifications 2023.7.1 py39haa95532_0
jupyter_client 8.6.0 py39haa95532_0
jupyter_core 5.5.0 py39haa95532_0
jupyterlab_pygments 0.2.2 py39haa95532_0
keyring 24.3.1 py39haa95532_0
kiwisolver 1.4.4 py39hd77b12b_0
krb5 1.20.1 h5b6d351_0
lazy-object-proxy 1.10.0 py39h2bbff1b_0
lcms2 2.12 h83e58a3_0
lerc 3.0 hd77b12b_0
libbrotlicommon 1.0.9 h2bbff1b_8
libbrotlidec 1.0.9 h2bbff1b_8
libbrotlienc 1.0.9 h2bbff1b_8
libclang 14.0.6 default_hb5a9fac_1
libclang13 14.0.6 default_h8e68704_1
libdeflate 1.17 h2bbff1b_1
libpng 1.6.39 h8cc25b3_0
libpq 12.17 h906ac69_0
libsodium 1.0.18 h62dcd97_0
libspatialindex 1.9.3 h6c2663c_0
libtiff 4.5.1 hd77b12b_0
libuv 1.44.2 h2bbff1b_0
libwebp-base 1.3.2 h2bbff1b_0
lz4-c 1.9.4 h2bbff1b_1
markdown-it-py 2.2.0 py39haa95532_1
markupsafe 2.1.3 py39h2bbff1b_0
matplotlib 3.7.1 py39haa95532_1
matplotlib-base 3.7.1 py39hf11a4ad_1
matplotlib-inline 0.1.6 py39haa95532_0
mccabe 0.7.0 pyhd3eb1b0_0
mdurl 0.1.0 py39haa95532_0
mistune 2.0.4 py39haa95532_0
mkl 2023.1.0 h6b88ed4_46358
mkl-service 2.4.0 py39h2bbff1b_1
mkl_fft 1.3.8 py39h2bbff1b_0
mkl_random 1.2.4 py39h59b6b97_0
more-itertools 10.1.0 py39haa95532_0
mypy_extensions 1.0.0 py39haa95532_0
nbclient 0.8.0 py39haa95532_0
nbconvert 7.10.0 py39haa95532_0
nbformat 5.9.2 py39haa95532_0
nest-asyncio 1.6.0 py39haa95532_0
numexpr 2.8.4 py39h7b80656_1
numpy 1.20.3 py39h749eb61_1
numpy-base 1.20.3 py39h5bfbeaa_1
numpydoc 1.7.0 py39haa95532_0
openjpeg 2.4.0 h4fc8c34_0
opensim 4.4 py39np120 opensim-org
openssl 3.0.14 h827c3e9_0
packaging 23.2 py39haa95532_0
pandas 1.5.2 py39hf11a4ad_0
pandocfilters 1.5.0 pyhd3eb1b0_0
paramiko 2.8.1 pyhd3eb1b0_0
parso 0.8.3 pyhd3eb1b0_0
pathspec 0.10.3 py39haa95532_0
pexpect 4.8.0 pyhd3eb1b0_3
pickleshare 0.7.5 pyhd3eb1b0_1003
pillow 10.3.0 py39h2bbff1b_0
pip 24.0 py39haa95532_0
platformdirs 3.10.0 py39haa95532_0
pluggy 1.0.0 py39haa95532_1
ply 3.11 py39haa95532_0
pooch 1.7.0 py39haa95532_0
prompt-toolkit 3.0.43 py39haa95532_0
psutil 5.9.0 py39h2bbff1b_0
ptyprocess 0.7.0 pyhd3eb1b0_2
pure_eval 0.2.2 pyhd3eb1b0_0
pycodestyle 2.11.1 py39haa95532_0
pycparser 2.21 pyhd3eb1b0_0
pydocstyle 6.3.0 py39haa95532_0
pyflakes 3.2.0 py39haa95532_0
pygments 2.15.1 py39haa95532_1
pylint 2.16.2 py39haa95532_0
pylint-venv 3.0.3 py39haa95532_0
pyls-spyder 0.4.0 pyhd3eb1b0_0
pynacl 1.5.0 py39h8cc25b3_0
pyparsing 3.0.9 py39haa95532_0
pyqt 5.15.10 py39hd77b12b_0
pyqt5-sip 12.13.0 py39h2bbff1b_0
pyqtwebengine 5.15.10 py39hd77b12b_0
pysocks 1.7.1 py39haa95532_0
python 3.9.19 h1aa4202_1
python-dateutil 2.9.0post0 py39haa95532_2
python-fastjsonschema 2.16.2 py39haa95532_0
python-lsp-black 2.0.0 py39haa95532_0
python-lsp-jsonrpc 1.1.2 pyhd3eb1b0_0
python-lsp-server 1.10.0 py39haa95532_0
python-slugify 5.0.2 pyhd3eb1b0_0
pytoolconfig 1.2.6 py39haa95532_0
pytz 2024.1 py39haa95532_0
pywin32 305 py39h2bbff1b_0
pywin32-ctypes 0.2.2 py39haa95532_0
pyyaml 6.0.1 py39h2bbff1b_0
pyzmq 25.1.2 py39hd77b12b_0
qdarkstyle 3.2.3 pyhd3eb1b0_0
qstylizer 0.2.2 py39haa95532_0
qt-main 5.15.2 h19c9488_10
qt-webengine 5.15.9 h5bd16bc_7
qtawesome 1.2.2 py39haa95532_0
qtconsole 5.5.1 py39haa95532_0
qtpy 2.4.1 py39haa95532_0
referencing 0.30.2 py39haa95532_0
requests 2.32.2 py39haa95532_0
rich 13.3.5 py39haa95532_0
rope 1.12.0 py39haa95532_0
rpds-py 0.10.6 py39h062c2fa_0
rtree 1.0.1 py39h2eaa2aa_0
scipy 1.10.1 py39hdcfc7df_1
setuptools 69.5.1 py39haa95532_0
sip 6.7.12 py39hd77b12b_0
six 1.16.0 pyhd3eb1b0_1
snowballstemmer 2.2.0 pyhd3eb1b0_0
sortedcontainers 2.4.0 pyhd3eb1b0_0
soupsieve 2.5 py39haa95532_0
sphinx 7.3.7 py39h827c3e9_0
sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0
sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0
sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0
sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0
sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0
sphinxcontrib-serializinghtml 1.1.10 py39haa95532_0
spyder 5.5.1 py39haa95532_1
spyder-kernels 2.5.0 py39haa95532_0
sqlite 3.45.3 h2bbff1b_0
stack_data 0.2.0 pyhd3eb1b0_0
tabulate 0.9.0 py39haa95532_0
tbb 2021.8.0 h59b6b97_0
text-unidecode 1.3 pyhd3eb1b0_0
textdistance 4.2.1 pyhd3eb1b0_0
three-merge 0.1.1 pyhd3eb1b0_0
tinycss2 1.2.1 py39haa95532_0
tomli 2.0.1 py39haa95532_0
tomlkit 0.11.1 py39haa95532_0
tornado 6.4.1 py39h827c3e9_0
traitlets 5.14.3 py39haa95532_0
typing-extensions 4.11.0 py39haa95532_0
typing_extensions 4.11.0 py39haa95532_0
tzdata 2024a h04d1e81_0
ujson 5.10.0 py39h5da7b33_0
unicodedata2 15.1.0 py39h2bbff1b_0
unidecode 1.2.0 pyhd3eb1b0_0
urllib3 2.2.1 py39haa95532_0
vc 14.2 h2eaa2aa_1
vs2015_runtime 14.29.30133 h43f2093_3
watchdog 4.0.1 py39haa95532_0
wcwidth 0.2.5 pyhd3eb1b0_0
webencodings 0.5.1 py39haa95532_1
whatthepatch 1.0.2 py39haa95532_0
wheel 0.43.0 py39haa95532_0
win_inet_pton 1.1.0 py39haa95532_0
wrapt 1.14.1 py39h2bbff1b_0
xz 5.4.6 h8cc25b3_1
yaml 0.2.5 he774522_0
yapf 0.40.2 py39haa95532_0
zeromq 4.3.5 hd77b12b_0
zipp 3.17.0 py39haa95532_0
zlib 1.2.13 h8cc25b3_1
zstd 1.5.5 hd43e919_2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions