Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG]: unable to install due to type error #197

Open
mlopez-ntop opened this issue Oct 9, 2024 · 3 comments
Open

🐛[BUG]: unable to install due to type error #197

mlopez-ntop opened this issue Oct 9, 2024 · 3 comments
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@mlopez-ntop
Copy link

mlopez-ntop commented Oct 9, 2024

Version

1.7.0

On which installation method(s) does this occur?

No response

Describe the issue

When attempting to install the subprocess exits due to an error:
TypeError: float() argument must be a string or a real number, not 'NoneType'

This issue occurs when installing from pypi or from source

Minimum reproducible example

To reproduce from source:

git clone [email protected]:NVIDIA/modulus-sym.git && cd modulus-sym

pip install --upgrade pip
pip install . 

Relevant log output

(modulus-sym) C:\dev\modulus-sym>pip install .
Processing c:\dev\modulus-sym
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      C:\Users\<user_name>\AppData\Local\Temp\pip-build-env-igsxkvtb\overlay\Lib\site-packages\torch\_subclasses\functional_tensor.py:258: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\torch\csrc\utils\tensor_numpy.cpp:84.)
        cpu = _conversion_method_template(device=torch.device("cpu"))
      Traceback (most recent call last):
        File "C:\Users\<user_name>\miniconda3\envs\modulus-sym\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\<user_name>\miniconda3\envs\modulus-sym\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\<user_name>\miniconda3\envs\modulus-sym\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\<user_name>\AppData\Local\Temp\pip-build-env-igsxkvtb\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\<user_name>\AppData\Local\Temp\pip-build-env-igsxkvtb\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "C:\Users\<user_name>\AppData\Local\Temp\pip-build-env-igsxkvtb\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 45, in <module>
        File "<string>", line 25, in cuda_extension
      TypeError: float() argument must be a string or a real number, not 'NoneType'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Environment details

Install was attempted on Windows 10 in a python virtual env (anaconda) with python version 3.11.2. Prior to installing both torch and numpy were manually installed via pip.
Additional attempts were made on a new virtual env using python 3.10.5 and outside of anaconda (python 3.10.5 as well)

Other/Misc.

No response

@mlopez-ntop mlopez-ntop added ? - Needs Triage Need team to review and classify bug Something isn't working labels Oct 9, 2024
@konok415
Copy link

Facing the same issue man ! Wish someone could help !

@eacuellarq
Copy link

you can try install WSL with Ubuntu distribution. According to page Nvidia Modulus sym, you have to use Linux always

https://docs.nvidia.com/deeplearning/modulus/getting-started/

@AvisP
Copy link

AvisP commented Oct 24, 2024

Can confirm works properly on wsl, only thing is your GPU driver should be updated and then update linux packages and install the cuda libraries for wsl from this link. You may need to add the path as the instruction says after installing the coda drivers for wsl by doing export of the paths.

Check with nvcc --version and may have to restart wsl and do source ~/.bashrc if it doesn't work.

Once that is done install PyTorch and had to do the following

pip install nvidia-modulus 
pip install "pint==0.19.2" 
pip install nvidia-modulus.sym --no-build-isolation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants