I’m writing a (really janky) 2d fluid simulation in Python. Currently I’m generating a starting state for the sim by just filling a 2d array with random floats generated by the random
module, and then blurring the texture by averaging each cell with the ones around it. This is very slow, and produces a noise texture that’s somewhat blocky due to the square blur shape. So once I got bored of waiting for ten seconds every now and then for python to generate a new random grid, I decided to invest what I thought would be a mere ten minutes into figuring out how to use a library for it. Five hours later, I find myself exactly where I started, just more frustrated. I’ve been trying to install this package using the command pip install noise
, but every time I try the command the same error comes back, even after trying every other fix for similar problems I could find. The error looks like this:
Defaulting to user installation because normal site-packages is not writeable
Collecting noise
Using cached noise-1.2.2.zip (132 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: noise
Building wheel for noise (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating buildlib.win32-cpython-312
creating buildlib.win32-cpython-312noise
copying perlin.py -> buildlib.win32-cpython-312noise
copying shader.py -> buildlib.win32-cpython-312noise
copying shader_noise.py -> buildlib.win32-cpython-312noise
copying test.py -> buildlib.win32-cpython-312noise
copying __init__.py -> buildlib.win32-cpython-312noise
running build_ext
building 'noise._simplex' extension
creating buildtemp.win32-cpython-312
creating buildtemp.win32-cpython-312Release
"C:Program FilesMicrosoft Visual Studio2022CommunityVCToolsMSVC14.36.32532binHostX86x86cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-IC:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0include" "-IC:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0Include" "-IC:Program FilesMicrosoft Visual Studio2022CommunityVCToolsMSVC14.36.32532include" "-IC:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliaryVSinclude" "-IC:Program Files (x86)Windows Kits10include10.0.22000.0ucrt" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\um" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\shared" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\winrt" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\cppwinrt" "-IC:Program Files (x86)Windows KitsNETFXSDK4.8includeum" "-IC:Program FilesMicrosoft Visual Studio2022CommunityVCToolsMSVC14.36.32532include" "-IC:Program FilesMicrosoft Visual Studio2022CommunityVCAuxiliaryVSinclude" "-IC:Program Files (x86)Windows Kits10include10.0.22000.0ucrt" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\um" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\shared" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\winrt" "-IC:Program Files (x86)Windows Kits10\include10.0.22000.0\cppwinrt" "-IC:Program Files (x86)Windows KitsNETFXSDK4.8includeum" /Tc_simplex.c /Fobuildtemp.win32-cpython-312Release_simplex.obj
_simplex.c
_simplex.c(235): warning C4244: 'return': conversion from 'double' to 'float', possible loss of data
_simplex.c(296): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
_simplex.c(297): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
_simplex.c(308): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
_simplex.c(309): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
"C:Program FilesMicrosoft Visual Studio2022CommunityVCToolsMSVC14.36.32532binHostX86x86link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0libs" "/LIBPATH:C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0" "/LIBPATH:C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.12_3.12.1008.0_x64__qbz5n2kfra8p0PCbuildwin32" "/LIBPATH:C:Program FilesMicrosoft Visual Studio2022CommunityVCToolsMSVC14.36.32532libx86" "/LIBPATH:C:Program Files (x86)Windows KitsNETFXSDK4.8libumx86" "/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.22000.0ucrtx86" "/LIBPATH:C:Program Files (x86)Windows Kits10\lib10.0.22000.0\umx86" "/LIBPATH:C:Program FilesMicrosoft Visual Studio2022CommunityVCToolsMSVC14.36.32532libx86" "/LIBPATH:C:Program Files (x86)Windows KitsNETFXSDK4.8libumx86" "/LIBPATH:C:Program Files (x86)Windows Kits10lib10.0.22000.0ucrtx86" "/LIBPATH:C:Program Files (x86)Windows Kits10\lib10.0.22000.0\umx86" /EXPORT:PyInit__simplex buildtemp.win32-cpython-312Release_simplex.obj /OUT:buildlib.win32-cpython-312noise_simplex.cp312-win_amd64.pyd /IMPLIB:buildtemp.win32-cpython-312Release_simplex.cp312-win_amd64.lib
Creating library buildtemp.win32-cpython-312Release_simplex.cp312-win_amd64.lib and object buildtemp.win32-cpython-312Release_simplex.cp312-win_amd64.exp
_simplex.obj : error LNK2001: unresolved external symbol __imp__PyFloat_FromDouble
_simplex.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetString
_simplex.obj : error LNK2001: unresolved external symbol __imp__PyExc_ValueError
_simplex.obj : error LNK2001: unresolved external symbol __imp__PyModule_Create2
_simplex.obj : error LNK2001: unresolved external symbol __imp__PyArg_ParseTupleAndKeywords
buildlib.win32-cpython-312noise_simplex.cp312-win_amd64.pyd : fatal error LNK1120: 5 unresolved externals
error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\bin\HostX86\x86\link.exe' failed with exit code 1120
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for noise
Running setup.py clean for noise
Failed to build noise
ERROR: Could not build wheels for noise, which is required to install pyproject.toml-based projects
I’ve tried updating wheel, setuptools, Cmake, pip, Python, and even PowerShell to no avail. I’ve added all the python-related dirs to PATH
as well. Nothing has worked, I still get the same error.