somexlab / fastddm

Python library for Differential Dynamic Microscopy analysis
https://fastddm.readthedocs.io/
GNU General Public License v3.0
3 stars 0 forks source link

Compile error in windows python only #148

Closed moyuanchen closed 1 year ago

moyuanchen commented 1 year ago

Description When installing in windows with no flags enabled, I get an error from CMake.

To Reproduce Steps to reproduce the behavior:

  1. Run installer with python -m pip install . from directory
  2. See error:

    CMake Error at CMakeLists.txt:5 (project):
        Generator
    
          NMake Makefiles
    
        does not support platform specification, but platform
    
          x64
    
        was specified.
    
      CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
      CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
          main()
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 249, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\build_meta.py", line 416, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup
          self).run_setup(setup_script=setup_script)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 160, in <module>
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 343, in run
          self.run_command("build")
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\dist.py", line 1244, in run_command
          super().run_command(command)
        File "C:\Users\SOMEX_OFF_03\AppData\Local\Temp\pip-build-env-89xjn9kr\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 93, in run
        File "<string>", line 148, in build_extension
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1008.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\SOMEX_OFF_03\\Documents\\GitHub\\fastddm', '-A', 'x64']' returned non-zero exit status 1.
      [end of output]

Expected behavior No errors.

Desktop (please complete the following information):

enrico-lattuada commented 1 year ago

Commit 19c63ee should give the relevant information to install the package on Windows without issues.

moyuanchen commented 1 year ago

These are the steps I followed to install fastddm on the ISTA laptop computer

  1. Install Visual Studio Community Edition
  2. install python from windows store
  3. install git from https://git-scm.com/download/win
  4. run python -m pip install . in the git clone folder with windows powershell