Spitfire
Spitfire copied to clipboard
Installation Errors - is there a Visual Studio dependency?
I used installation directions here:
https://spitfire.readthedocs.io/en/latest/?badge=latest
When I tried to do this:
pip install .
I got this:
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "D:\...\Spitfire\setup.py", line 79, in <module>
c.write_gitinfo()
File "D:\...\Spitfire\setup.py", line 47, in write_gitinfo
tags = sorted(repo.tags, key=lambda t: t.commit.committed_datetime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\...\Spitfire\setup.py", line 47, in <lambda>
tags = sorted(repo.tags, key=lambda t: t.commit.committed_datetime)
^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\refs\tag.py", line 55, in commit
obj = self.object
^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\refs\tag.py", line 85, in object
return Reference._get_object(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\refs\symbolic.py", line 288, in _get_object
return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\objects\base.py", line 149, in new_from_sha
oinfo = repo.odb.info(sha1)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\db.py", line 41, in info
hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\cmd.py", line 1678, in get_object_header
return self.__get_object_header(cmd, ref)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\cmd.py", line 1662, in __get_object_header
return self._parse_object_header(cmd.stdout.readline())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Apoge\anaconda3\envs\...\Lib\site-packages\git\cmd.py", line 1621, in _parse_object_header
raise ValueError(err_msg)
ValueError: SHA is empty, possible dubious ownership in the repository at D:\...\Spitfire.
If this is unintended run:
"git config --global --add safe.directory D:\...\Spitfire"
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
When I got to here:
python3 -m unittest discover -s tests
It gave me lots of errors:
======================================================================
ERROR: time_integration.test_vs_scipy_integrate (unittest.loader._FailedTest.time_integration.test_vs_scipy_integrate)
----------------------------------------------------------------------
ImportError: Failed to import test module: time_integration.test_vs_scipy_integrate
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\unittest\loader.py", line 419, in _find_test_path
module = self._get_module_from_name(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\unittest\loader.py", line 362, in _get_module_from_name
__import__(name)
File "D:\...\Spitfire\tests\time_integration\test_vs_scipy_integrate.py", line 3, in <module>
from scipy import integrate as scipy_integrate
ModuleNotFoundError: No module named 'scipy'
----------------------------------------------------------------------
Ran 31 tests in 0.003s
FAILED (errors=31)
Scrolling back through previous steps, I found this:
C:\Windows\System32>type "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"
The system cannot find the path specified.
C:\Windows\System32>dir "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\\VC\Redist\MSVC\"
The system cannot find the path specified.
Questions:
- Does this require a pre-installed version of Microsoft Visual Studio in order to operate?
- Is this suggesting that I have some version of VS that is not running properly?
Note: Names were changed to protect the innocent.