chrisleaman / py-wave-runup

Empirical wave runup models implemented in Python
38 stars 16 forks source link

Error in installing with Vscode and Jupyter #236

Open avnibu opened 8 months ago

avnibu commented 8 months ago

Hello, this looks like a very interesting package. Unfortunately, I wasn't able to install it on my VSCode environment with python 3.12.0. What could be the reason? Here's the error message when i run the pip install command in the terminal.

PS C:\> pip install py-wave-runup
Collecting py-wave-runup
  Downloading py_wave_runup-0.1.10-py3-none-any.whl (730 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 731.0/731.0 kB 7.7 MB/s eta 0:00:00
Collecting joblib<0.15.0,>=0.14.1 (from py-wave-runup)
  Downloading joblib-0.14.1-py2.py3-none-any.whl (294 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.9/294.9 kB 8.9 MB/s eta 0:00:00
Requirement already satisfied: numpy<2.0,>=1.16 in c:\users\USERNAME\appdata\local\programs\python\python312\lib\site-packages (from py-wave-runup) (1.26.1)
Collecting pandas<0.26.0,>=0.25.3 (from py-wave-runup)
  Downloading pandas-0.25.3.tar.gz (12.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.6/12.6 MB 7.7 MB/s eta 0:00:00
  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
  ╰─> [30 lines of output]
      <string>:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python312\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\USERNAME\AppData\Local\Programs\Python\Python312\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\USERNAME\AppData\Local\Temp\pip-build-env-3tqxd2c2\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-build-env-3tqxd2c2\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-build-env-3tqxd2c2\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-build-env-3tqxd2c2\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 812, in <module>
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-install-h83d5983\pandas_2ade6b1fdd3b438dbfe843256dbf4b88\versioneer.py", line 1440, in get_version
          return get_versions()["version"]
                 ^^^^^^^^^^^^^^
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-install-h83d5983\pandas_2ade6b1fdd3b438dbfe843256dbf4b88\versioneer.py", line 1369, in get_versions
          cfg = get_config_from_root(root)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\USERNAME\AppData\Local\Temp\pip-install-h83d5983\pandas_2ade6b1fdd3b438dbfe843256dbf4b88\versioneer.py", line 401, in get_config_from_root
          parser = configparser.SafeConfigParser()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
      [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.
chrisleaman commented 8 months ago

I think the problem is you're using Python 3.12, which looks like has some breaking changes. You should have better luck with Python 3.9 if possible until I'm able to fix the changes.

avnibu commented 8 months ago

Thanks for your quick response. I fired up a venv with python version 3.9.13 but I still couldn't install. I even launched a clean docker container with this image and still got error messages similar to this.

It seems like there's something funny going on with the pandas version you require. Although, I'm not an expert on these things, this seems to be where the install script is failing. Here's the pip log from the venv trial I mentioned above.

py-wave-runup-install.log

catarinacecilio commented 3 months ago

I have just installed using a new env with Python 3.6.13

collinjroland commented 3 months ago

I successfully installed using python=3.8 when creating the venv, but was also not able to successfully install using python=3.9.