PyThea is an open-source software package to perform coronal mass ejection (CME) and shock wave 3D reconstruction using multi-viewpoint remote-sensing observations.
On Windows, the pip installation fails because Windows doesn't have a HOME environment variable (at least not always); it uses USERPROFILE instead (as far as I understand):
(base) PS C:\Users\user> pip install PyThea==0.7.1
Collecting PyThea==0.7.1
Using cached PyThea-0.7.1.tar.gz (48 kB)
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
╰─> [19 lines of output]
Traceback (most recent call last):
File "C:\Users\user\miniconda3\envs\base\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
main()
File "C:\Users\user\miniconda3\envs\base\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\user\miniconda3\envs\base\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\user\AppData\Local\Temp\pip-build-env-pfvfasnq\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\user\AppData\Local\Temp\pip-build-env-pfvfasnq\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires
self.run_setup()
File "C:\Users\user\AppData\Local\Temp\pip-build-env-pfvfasnq\overlay\Lib\site-packages\setuptools\build_meta.py", line 484, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\user\AppData\Local\Temp\pip-build-env-pfvfasnq\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup
exec(code, locals())
File "<string>", line 10, in <module>
File "C:\Users\user\miniconda3\envs\base\lib\os.py", line 679, in __getitem__
raise KeyError(key) from None
KeyError: 'HOME'
[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.
This can be fixed, for example, by replacing os.environ['HOME'] with Path.home() (requires from pathlib import Path).
On Windows, the pip installation fails because Windows doesn't have a HOME environment variable (at least not always); it uses USERPROFILE instead (as far as I understand):
This can be fixed, for example, by replacing
os.environ['HOME']
withPath.home()
(requiresfrom pathlib import Path
).