Closed ddogfoodd closed 1 year ago
It's related to a known issue in pysobatools in python 3.10. You can try this workaround: https://github.com/stevewongv/InstanceShadowDetection/issues/24#issuecomment-1668927882
The workaround did solve the error. Thank you! However I had to remove the whole SSIS dir and install and build everything again or else the build of pysobatools would fail, just a FYI if anyone stumbles across the same thing.
Hi I was try to apply this workaround on the demo Colab
I modify this code block before excuting any blocks, and the pysobatools fails on build.
!pip install git+https://github.com/facebookresearch/detectron2.git -q
!pip install scikit-image numpy kornia opencv-python-headless -q
# !pip install git+https://github.com/stevewongv/InstanceShadowDetection.git#subdirectory=PythonAPI
!pip install git+https://github.com/stevewongv/InstanceShadowDetection.git@50764eb336f3194db382054fe537956dd8449c01#subdirectory=PythonAPI
Preparing metadata (setup.py) ... done
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.2/50.2 kB 2.1 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 kB 6.6 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.5/154.5 kB 9.0 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 16.7 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.0/117.0 kB 11.3 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheel for detectron2 (setup.py) ... done
Building wheel for fvcore (setup.py) ... done
Building wheel for antlr4-python3-runtime (setup.py) ... done
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 705.7/705.7 kB 8.0 MB/s eta 0:00:00
Collecting git+https://github.com/stevewongv/InstanceShadowDetection.git@50764eb336f3194db382054fe537956dd8449c01#subdirectory=PythonAPI
Cloning https://github.com/stevewongv/InstanceShadowDetection.git (to revision 50764eb336f3194db382054fe537956dd8449c01) to /tmp/pip-req-build-x5fb8eb_
Running command git clone --filter=blob:none --quiet https://github.com/stevewongv/InstanceShadowDetection.git /tmp/pip-req-build-x5fb8eb_
Running command git rev-parse -q --verify 'sha^50764eb336f3194db382054fe537956dd8449c01'
Running command git fetch -q https://github.com/stevewongv/InstanceShadowDetection.git 50764eb336f3194db382054fe537956dd8449c01
Running command git checkout -q 50764eb336f3194db382054fe537956dd8449c01
Resolved https://github.com/stevewongv/InstanceShadowDetection.git to commit 50764eb336f3194db382054fe537956dd8449c01
Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools>=18.0 in /usr/local/lib/python3.10/dist-packages (from pysobatools==2.0) (67.7.2)
Requirement already satisfied: cython>=0.27.3 in /usr/local/lib/python3.10/dist-packages (from pysobatools==2.0) (0.29.36)
Requirement already satisfied: matplotlib>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from pysobatools==2.0) (3.7.1)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (1.1.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (4.42.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (1.4.4)
Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (1.23.5)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (23.1)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (9.4.0)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib>=2.1.0->pysobatools==2.0) (2.8.2)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.7->matplotlib>=2.1.0->pysobatools==2.0) (1.16.0)
Building wheels for collected packages: pysobatools
error: subprocess-exited-with-error
× python setup.py bdist_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.
Building wheel for pysobatools (setup.py) ... error
ERROR: Failed building wheel for pysobatools
Running setup.py clean for pysobatools
Failed to build pysobatools
ERROR: Could not build wheels for pysobatools, which is required to install pyproject.toml-based projects
Oh right, I probably should mention that I only tried this workaround on my local setup where I edited the requirement.txt
file.
On Colab I just tried something similar to @yudi-xiao and got the same error. Therefore I am reopening this issue.
The workaround did solve the error. Thank you! However I had to remove the whole SSIS dir and install and build everything again or else the build of pysobatools would fail, just a FYI if anyone stumbles across the same thing.
Could you please specifiy what exactly you did to install pysobatools successfully? Like, step by step? Thanks! I removed SSIS, installed it again, then tried installing pysobatools from the specified commit and it still fails
@stevewongv Also occurs in python 3.9
@aviadmx Sure, here is what I did step-by-step. Keep in mind that it worked on my setup not in Colab.
wget https://github.com/stevewongv/SSIS/archive/refs/heads/main.zip
)SSIS
if it was named differentlycd
into the repo directorypython3 -m venv venv
) and activate itpip install onnx protobuf
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
for torch 1.11.0 and CUDA 11.3, look up what you need and find the command here)requirement.txt
file and replacing git+https://github.com/stevewongv/InstanceShadowDetection.git#subdirectory=PythonAPI
with git+https://github.com/stevewongv/InstanceShadowDetection.git@50764eb336f3194db382054fe537956dd8449c01#subdirectory=PythonAPI
pip install -r requirement.txt
python3 setup.py build develop -d /path/depends/on/your/setup/python3.8/site-packages/
, note to change the path according to your Python installation)pip install opencv-python
That's probably it. I came across some more pip errors at some point which I just fixed by uninstalling and installing everything it showed errors for.
I have just fixed the demo in Colab. It was a bit strange when building the pysobatools, but I managed to fix it by using a workaround.
@stevewongv Thanks again!
Hey there, the demo is not working locally nor in colab.
Following the notebook in colab the following error message is returned:
Similarly I tried to run the demo locally following the instructions in the README (using CUDA 11.3 and torch 1.11.0 both of which should be supported according to the README) and it returns a similar error: