threestudio-project / threestudio

A unified framework for 3D content generation.
Apache License 2.0
6.17k stars 475 forks source link

Pip errors #385

Closed pavankay closed 9 months ago

pavankay commented 9 months ago

Collecting git+https://github.com/KAIR-BAIR/nerfacc.git@v0.5.2 (from -r requirements.txt (line 5)) Cloning https://github.com/KAIR-BAIR/nerfacc.git (to revision v0.5.2) to c:\users\user\appdata\local\temp\pip-req-build-5b9xhi73 Running command git clone --filter=blob:none --quiet https://github.com/KAIR-BAIR/nerfacc.git 'C:\Users\user\AppData\Local\Temp\pip-req-build-5b9xhi73' Running command git checkout -q d84cdf3afd7dcfc42150e0f0506db58a5ce62812 Resolved https://github.com/KAIR-BAIR/nerfacc.git to commit d84cdf3afd7dcfc42150e0f0506db58a5ce62812 Running command git submodule update --init --recursive -q 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 ╰─> [21 lines of output] Traceback (most recent call last): File "C:\Users\user\threestudio\stable\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\user\threestudio\stable\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\threestudio\stable\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Local\Temp\pip-build-env-4llz8r2l\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, 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-4llz8r2l\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() File "C:\Users\user\AppData\Local\Temp\pip-build-env-4llz8r2l\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) File "C:\Users\user\AppData\Local\Temp\pip-build-env-4llz8r2l\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 123, in File "", line 27, in get_extensions ModuleNotFoundError: No module named 'torch' [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.

[notice] A new release of pip is available: 23.2.1 -> 23.3.2 [notice] To update, run: python.exe -m pip install --upgrade pip

drwootton commented 9 months ago

I'm running into this too, where my system is Fedora 38 and the system python is python3.11. I've had trouble with python 3.11 working with various AI projects since it seems many assume python 3.10. I've set up python 3.10 virtual environments for other projects and they work fine. If I activate this project's virtual environment and then invoke python manually, I can 'import torch' at the command prompt and it works since torch is installed. However, when I run pip install -r requirements.txtin the same terminal session, the import torch fails.

I'm wondering if there's somewhere in the installer code for this package there's an explicit invocation of /bin/python or /bin/python3 (or /usr/bin) instead of just invoking puthon and relying on $PATH to be set. In my case, that gets me python 3.11, which would fail.

Just sort of wondering if this might be what's going on.

Edit ==> If I just set my venv up to use the system python 3.11 and not point to my python 3.10 anywhere, then the pip install -r requirements.txt completes.**

Maybe my attempt to use python 3.10 is just busted, or maybe this is another clue what's going on.

pavankay commented 9 months ago

Edit ==> figured it out now, I used conda not pointing to my python 3.10 thanks!

dh1011 commented 9 months ago

I got the same issue but after downgrading pip to 23.0.1, it solved. I'm using python 3.11.

Jakoban2411 commented 5 months ago

Im having the same issue python 3.12 pip 24.0.0

yanis-falaki commented 2 months ago

Same issue with python 3.10.12 pip 24.1.2

yanis-falaki commented 2 months ago

Same issue with python 3.10.12 pip 24.1.2

downgrading to pip to 23.0.1 solved it