-
-
Save kwea123/a3c541a325e895ef79ecbc0d2e6d7221 to your computer and use it in GitHub Desktop.
@Dawn11041107 Hi my friend. I made the same changes in the requirement.txt and train.py files that you previously made. However, upon running the code, I encountered the following error:
Building wheels for collected packages: test-tube, opencv-python, pycollada
Building wheel for test-tube (setup.py) ... done
Created wheel for test-tube: filename=test_tube-0.7.5-py3-none-any.whl size=25328 sha256=e81f157fbb28dda5795f5ff96e34cc4bf30c5d1cb8a112c9380b0b1ee0b34e4d
Stored in directory: /root/.cache/pip/wheels/28/d4/8b/1aeb47c0dedd931b8e6aec55a8091864a69ac6f0adc5b12ea9
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 opencv-python (setup.py) ... error
ERROR: Failed building wheel for opencv-python
Running setup.py clean for opencv-python
Building wheel for pycollada (setup.py) ... done
Created wheel for pycollada: filename=pycollada-0.7.2-py3-none-any.whl size=127017 sha256=3e607381f7ab945b02a3fc1c02ff15efafc3136b12304969d6f1633d9181e774
Stored in directory: /root/.cache/pip/wheels/d5/ba/33/1e99a7e7defd1d77f0210e7a39ff58de2a2d8d4c22466bb2da
Successfully built test-tube pycollada
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects
/content/nerf_pl/torchsearchsorted
Thank you in advance for your help
@Dawn11041107 Hi my friend. I made the same changes in the requirement.txt and train.py files that you previously made. However, upon running the code, I encountered the following error:
Building wheels for collected packages: test-tube, opencv-python, pycollada Building wheel for test-tube (setup.py) ... done Created wheel for test-tube: filename=test_tube-0.7.5-py3-none-any.whl size=25328 sha256=e81f157fbb28dda5795f5ff96e34cc4bf30c5d1cb8a112c9380b0b1ee0b34e4d Stored in directory: /root/.cache/pip/wheels/28/d4/8b/1aeb47c0dedd931b8e6aec55a8091864a69ac6f0adc5b12ea9 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 opencv-python (setup.py) ... error ERROR: Failed building wheel for opencv-python Running setup.py clean for opencv-python Building wheel for pycollada (setup.py) ... done Created wheel for pycollada: filename=pycollada-0.7.2-py3-none-any.whl size=127017 sha256=3e607381f7ab945b02a3fc1c02ff15efafc3136b12304969d6f1633d9181e774 Stored in directory: /root/.cache/pip/wheels/d5/ba/33/1e99a7e7defd1d77f0210e7a39ff58de2a2d8d4c22466bb2da Successfully built test-tube pycollada Failed to build opencv-python ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects /content/nerf_pl/torchsearchsorted
Thank you in advance for your help
@JeffreyLuW , I am having the same issue, do you have some progress?
@Dawn11041107 Hi my friend. I made the same changes in the requirement.txt and train.py files that you previously made. However, upon running the code, I encountered the following error:
Building wheels for collected packages: test-tube, opencv-python, pycollada Building wheel for test-tube (setup.py) ... done Created wheel for test-tube: filename=test_tube-0.7.5-py3-none-any.whl size=25328 sha256=e81f157fbb28dda5795f5ff96e34cc4bf30c5d1cb8a112c9380b0b1ee0b34e4d Stored in directory: /root/.cache/pip/wheels/28/d4/8b/1aeb47c0dedd931b8e6aec55a8091864a69ac6f0adc5b12ea9 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 opencv-python (setup.py) ... error ERROR: Failed building wheel for opencv-python Running setup.py clean for opencv-python Building wheel for pycollada (setup.py) ... done Created wheel for pycollada: filename=pycollada-0.7.2-py3-none-any.whl size=127017 sha256=3e607381f7ab945b02a3fc1c02ff15efafc3136b12304969d6f1633d9181e774 Stored in directory: /root/.cache/pip/wheels/d5/ba/33/1e99a7e7defd1d77f0210e7a39ff58de2a2d8d4c22466bb2da Successfully built test-tube pycollada Failed to build opencv-python ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects /content/nerf_pl/torchsearchsorted
Thank you in advance for your help
Hi, my friend. I tried again and found that the problem you mentioned above does occur. I used !pip show test-tube opencv-python pycollada
to check if they were installed. However, I still find some other issues...
In the end, I decided to remove the version specifications and continued using the train.py I wrote. Surprisingly, it worked perfectly fine without any problems.
PS: I met the OSError so that I add import os
in the train.py.
@Dawn11041107 . Hi my friend, i follow your guide and I face this bug in train.py
/content/nerf_pl
Traceback (most recent call last):
File "/content/nerf_pl/train.py", line 47, in
from pytorch_lightning.loggers import TestTubeLogger
ImportError: cannot import name 'TestTubeLogger' from 'pytorch_lightning.loggers' (/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loggers/init.py)
Can u teach me how to debug this pls.
@Dawn11041107 I am getting following error,
Validation DataLoader 0: 0% 0/1 [00:01<?, ?it/s]
Epoch 0: 100% 3536/3536 [16:02<00:00, 3.67it/s, loss=0.0143, v_num=2]
Traceback (most recent call last):
File "/content/nerf_pl/train.py", line 197, in
trainer.fit(system)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 771, in fit
self._call_and_handle_interrupt(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 724, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 812, in _fit_impl
results = self._run(model, ckpt_path=self.ckpt_path)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 1237, in _run
results = self._run_stage()
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 1324, in _run_stage
return self._run_train()
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 1354, in _run_train
self.fit_loop.run()
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loops/base.py", line 205, in run
self.on_advance_end()
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/loops/fit_loop.py", line 297, in on_advance_end
self.trainer._call_callback_hooks("on_train_epoch_end")
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 1637, in _call_callback_hooks
fn(self, self.lightning_module, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/early_stopping.py", line 179, in on_train_epoch_end
self._run_early_stopping_check(trainer)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/early_stopping.py", line 190, in _run_early_stopping_check
if trainer.fast_dev_run or not self._validate_condition_metric( # disable early_stopping with fast_dev_run
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/early_stopping.py", line 145, in _validate_condition_metric
raise RuntimeError(error_msg)
RuntimeError: Early stopping conditioned on metric None
which is not available. Pass in or modify your EarlyStopping
callback to use any of the following: ``
[W observer.cpp:104] Warning: Leaked callback handle: 1 (function operator())`
1.When running this code in Google Colab, please note that the built-in Python version is 3.10. You can use the following code to check the version:

import sys print(sys.version)
2.The code I provided(in the following screenshot) is my final requirement along with the train.py code. Please feel free to ask any questions if you need assistance!