lloydowen8 / place-heatmap-2022

Heatmap visualisation for the r/Place 2022 event
27 stars 2 forks source link

Adding details about Python requirements #10

Closed memmam closed 2 years ago

memmam commented 2 years ago

When attempting to set up my Python environment last night, I ran into the following error:

error: Could not build wheels for numpy, which is required to install pyproject.toml-based project

On Googling, it turns out that this is an issue with numpy and Python 3.10; installing Python 3.9 fixed it.

This PR is an edit to README.md that mentions the Python 3.9 requirement.

Alternatively, the issue may also be addressed by using newer versions of opencv-python and numpy, but I'm hesitant to make that change in case it breaks something.

lloydowen8 commented 2 years ago

I think its more appropriate if the version of numpy was changed, rather than specifying the version of python used

memmam commented 2 years ago

I had the same issue when trying to install opencv-python, in both cases it referenced numpy, I'm about to test on Python 3.10 with the new requirements.txt, if it still fails I'll update requirements.txt to remove the version number for opencv-python and open a new PR.

memmam commented 2 years ago

@lloydowen8 I just removed the opencv-python version requirement, as it still was breaking Python 3.10. I also added an environment variable and changed the order of imports in order to allow newer versions of OpenCV to work - opencv-python => 4.5.2 doesn't allow OpenEXR by default due to it having many security vulnerabilities, see this issue on the opencv repo.