Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to install without conda on windows? #41

Closed
turugi-ni opened this issue Jun 25, 2024 · 12 comments
Closed

Is there a way to install without conda on windows? #41

turugi-ni opened this issue Jun 25, 2024 · 12 comments

Comments

@turugi-ni
Copy link

My PC is not able to use the conda command after installing miniconda, is there any way to install locally without the conda command?

@wanghaisheng
Copy link

add path variable work

@jtydhr88
Copy link
Contributor

Definitely you could run it without conda.
I don’t think the command would have a big difference, you can refer to that how the conda version does

@turugi-ni
Copy link
Author

I am trying to install it in a virtual environment with venv. #15 (comment) of issues/15 Even if you install the software according to the instructions in
(venv) F:\Unique3D-main\venv>python app.py
D:\Touls\Programs\Python\Python310\python.exe: can't open file 'F:\Unique3D-main\venv\app.py': [Errno 2] No such file or directory
Error.will appear.

@jtydhr88
Copy link
Contributor

According to your error, you attempted to run python in wrong directory, you should not run it in the venv folder, you should run it the parent folder

@turugi-ni
Copy link
Author

turugi-ni commented Jun 26, 2024

I tried to run it in the parent folder.
F:\Unique3D>python app.py
ERROR: onnxruntime_gpu-1.17.0-cp310-cp310-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.
ERROR: Invalid requirement: 'nvdiffrast==0.3.1.torch': Expected end or semicolon (after version specifier)
nvdiffrast==0.3.1.torch
~~~~~~~^
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 23, in
import fire
ModuleNotFoundError: No module named 'fire'
Error.will appear.
Also, activate the virtual environment. Even if you run
ERROR: onnxruntime_gpu-1.17.0-cp310-cp310-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.
ERROR: Invalid requirement: 'nvdiffrast==0.3.1.torch': Expected end or semicolon (after version specifier)
nvdiffrast==0.3.1.torch
~~~~~~~^
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 25, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
Error.will appear.

@jtydhr88
Copy link
Contributor

It is definitely that you miss lots of dependents which need to install manually

@turugi-ni
Copy link
Author

turugi-ni commented Jun 30, 2024

app.py at the beginning of the pip install package/onnxruntime_gpu-1.17.0-cp310-cp310-manylinux_2_28_x86_64.whl --force-reinstall --no-deps and pip install package/nvdiffrast-0.3.1.torch-cp310-cp310-linux_x86_64.whl --force-reinstall --no-deps Since it is described as My OS is Windows, not ylinux, so that is where the error occurs. therefore onnxruntime-win-x64-gpu-1.17.0 and nvdiffrast-0.3.1 source in the package folder and change the notation at the beginning of app.py to pip install package/onnxruntime-win-x64-gpu-1.17.0 --force-reinstall --no-deps and pip install package/nvdiffrast-0.3.1 --force-reinstall --no-deps and then change it to I ran app.py and it seems to install nvdiffrast-0.3.1, but onnxruntime-win-x64-gpu-1.17.0 will cause an error The error log is as follows
(venv) F:\Unique3D>python app.py
ERROR: Directory 'package/onnxruntime-win-x64-gpu-1.17.0' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Processing f:\unique3d\package\nvdiffrast-0.3.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: nvdiffrast
Building wheel for nvdiffrast (pyproject.toml) ... done
Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=140632 sha256=5bb62781386cc6471ad084baaafa616a6b714f780738df34e1603aa5b8d196de
Stored in directory: c:\users\turug\appdata\local\pip\cache\wheels\bf\db\68\709aa6d897f90c748a8f44b088fbe12dba707c6d84be374926
Successfully built nvdiffrast
Installing collected packages: nvdiffrast
Successfully installed nvdiffrast-0.3.1
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 25, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
To begin with the onnxruntime onnxruntime_gpu-1.18.1 is installed on the venv. next gradio_app\gradio_local.py --port 7860 I tried to start the error
(venv) F:\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D\gradio_app\gradio_local.py", line 20, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D.\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
will be displayed.
I don't know what dependencies are needed and how to install them.

@turugi-ni
Copy link
Author

Clone the onnxruntime git code in the package folder and Change the notation at the beginning of app.py to pip install package/onnxruntime --force-reinstall --no-deps app.py I tried to start the error
(venv) F:\Unique3D>python app.py
Processing f:\unique3d\package\onnxruntime
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
╰─> [17 lines of output]
Traceback (most recent call last):
File "F:\Unique3D\venv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "F:\Unique3D\venv\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 "F:\Unique3D\venv\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\turug\AppData\Local\Temp\pip-build-env-9sxb58b9\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "C:\Users\turug\AppData\Local\Temp\pip-build-env-9sxb58b9\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "C:\Users\turug\AppData\Local\Temp\pip-build-env-9sxb58b9\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\turug\AppData\Local\Temp\pip-build-env-9sxb58b9\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
exec(code, locals())
File "", line 18, in
ModuleNotFoundError: No module named 'packaging'
[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.
Processing f:\unique3d\package\nvdiffrast-0.3.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: nvdiffrast
Building wheel for nvdiffrast (pyproject.toml) ... done
Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=140632 sha256=5055597c64ecbda7c13625b43bd03eb693c489169974130f040fe57963f347cc
Stored in directory: c:\users\turug\appdata\local\pip\cache\wheels\bf\db\68\709aa6d897f90c748a8f44b088fbe12dba707c6d84be374926
Successfully built nvdiffrast
Installing collected packages: nvdiffrast
Attempting uninstall: nvdiffrast
Found existing installation: nvdiffrast 0.3.1
Uninstalling nvdiffrast-0.3.1:
Successfully uninstalled nvdiffrast-0.3.1
Successfully installed nvdiffrast-0.3.1
Traceback (most recent call last):
File "F:\Unique3D\app.py", line 25, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
will be displayed.
Ignore.python gradio_app\gradio_local.py --port 7860 when trying to start error
(venv) F:\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D\gradio_app\gradio_local.py", line 20, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D.\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
will be displayed.

@turugi-ni
Copy link
Author

turugi-ni commented Jul 17, 2024

I think we are one step closer to launching in a virtual environment.
First, build a virtual environment with
python -m venv venv
The name of the virtual environment can be arbitrary.
Next, move the current directory to the virtual environment folder and activate the virtual environment.
cd venv
.\Scripts\Activate
Update pip.
python -m pip install --upgrade pip
Install Unique3D dependencies.
pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu118 pip install https://softology.pro/wheels/triton-2.1.0-cp310-cp310-win_amd64.whl pip install ninja pip install diffusers==0.27.2 pip install grpcio werkzeug tensorboard-data-server
Uninstall xformers and install the cuda11.8 version.
pip uninstall -y xformers pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts xformers==0.0.25 --index-url https://download.pytorch.org/whl/cu118 pip uninstall -y torch pip uninstall -y torch pip install --no-cache-dir --ignore-installed --force-reinstall --no-warn-conflicts torch==2.2.1+cu118 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Install onnxruntime and ort-nightly-gpu.
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/ pip install ort-nightly-gpu
Install spaces-0.28.3-py3-none-any.whl.
pip install https://files.pythonhosted.org/packages/b2/3c/6205090507ea96e6e56d0deda8d0fc4c507026ef3772e55b637a5d0b7c61/spaces-0.28.3-py3-none-any.whl
Install the Unique3D source.
git clone https://huggingface.co/spaces/Wuvin/Unique3D
Move the current directory to the Unique3D folder.
cd Unique3D
Modify requirements.txt.
type requirements.txt | findstr /v pytorch3d > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v ort-nightly > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v onnxruntime > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v torch-scatter > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v diffusers > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v xformers > stripped.txt del requirements.txt ren stripped.txt requirements.txt type requirements.txt | findstr /v torch > stripped.txt del requirements.txt ren stripped.txt requirements.txt
Install Unique3D itself.
pip install -r requirements.txt
The files in the package folder are for Linax, so delete them.Start a new command prompt in the package folder and install the onnxruntime source code.
git clone https://github.com/microsoft/onnxruntime.git
Download the version 0.3.1 resource from nvdiffrast and extract it in the package folder.
Open Unique3D\app.py with the text editor tool and change the notations on lines 5 and 10, respectively, to
pip install package/onnxruntime --force-reinstall --no-deps
pip install package/nvdiffrast-0.3.1 --force-reinstall --no-deps
Attempt to start app.py.
python app.py
The onnxruntime and nvdiffrast-0.3.1 are installed and then the error occurs.
(venv) F:\Unique3D-main\venv\Unique3D>python app.py
Processing f:\unique3d-main\venv\unique3d\package\onnxruntime
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
╰─> [17 lines of output]
Traceback (most recent call last):
File "F:\Unique3D-main\venv\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "F:\Unique3D-main\venv\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 "F:\Unique3D-main\venv\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\turug\AppData\Local\Temp\pip-build-env-rysjhnij\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "C:\Users\turug\AppData\Local\Temp\pip-build-env-rysjhnij\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "C:\Users\turug\AppData\Local\Temp\pip-build-env-rysjhnij\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\turug\AppData\Local\Temp\pip-build-env-rysjhnij\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
exec(code, locals())
File "", line 18, in
ModuleNotFoundError: No module named 'packaging'
[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.
Processing f:\unique3d-main\venv\unique3d\package\nvdiffrast-0.3.1
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: nvdiffrast
Building wheel for nvdiffrast (pyproject.toml) ... done
Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=140631 sha256=43de6ac37419d83c92e67dda9378b8dbe886c1ed666ee59f1c567ccdd3860520
Stored in directory: c:\users\turug\appdata\local\pip\cache\wheels\0d\8c\44\a4ef772736e8147e4d25ce4c4466d6a1fde95e1f61bb05f663
Successfully built nvdiffrast
Installing collected packages: nvdiffrast
Successfully installed nvdiffrast-0.3.1
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\app.py", line 25, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D-main\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D-main\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D-main\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
Ignore these errors and attempt to start gradio_local.py.
python gradio_app\gradio_local.py --port 7860
An error is displayed.
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D-main\venv\Unique3D.\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D-main\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D-main\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D-main\venv\lib\site-packages\spaces\zero\wrappers.py", line 15, in
from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Touls\Programs\Python\Python310\lib\multiprocessing\context.py)
This error occurs because ForkProcess is not compatible with Windows.
Open venv\lib\site-packages\spaces\zero\wrappers.py with a text editor tool and add lines 15 and 50 from multiprocessing.context import ForkProcess from multiprocessing.context import SpawnProcess
Process = from multiprocessing.get_context(‘fork’).Process
Process = multiprocessing.get_context(‘spawn’).Process.
Try to start gradio_local.py again.
python gradio_app\gradio_local.py --port 7860
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D-main\venv\Unique3D.\gradio_app\gradio_3dgen.py", line 1, in
import spaces
File "F:\Unique3D-main\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "F:\Unique3D-main\venv\lib\site-packages\spaces\zero\decorator.py", line 21, in
from .wrappers import regular_function_wrapper
File "F:\Unique3D-main\venv\lib\site-packages\spaces\zero\wrappers.py", line 41, in
from .gradio import try_
ImportError: cannot import name 'try_' from 'spaces.zero.gradio' (F:\Unique3D-main\venv\lib\site-packages\spaces\zero\gradio.py)
Import of try fails.
If you know how to import try_, you may be able to start gradio.

@turugi-ni
Copy link
Author

Originally in venv\Lib\site-packages\spaces\zero\gradio.py there is no try_ itself and def try_process_queue_event.
In venv\Lib\site-packages\spaces\zero\wrappers.py, lines 41 and 42 from .gradio import try_queue_event
This is probably a typo,
Modify line 41 of venv\Lib\site-packages\spaces\zero\wrappers.py, from .gradio import try_process_queue_event to try to start gradio_local.py.
result
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D-main\venv\Unique3D.\gradio_app\gradio_3dgen.py", line 5, in
from pytorch3d.structures import Meshes
ModuleNotFoundError: No module named 'pytorch3d'
You will probably get an error requiring installation of pytorch3d.

@turugi-ni
Copy link
Author

I got as far as cloning pytorch3d's git.
try to start gradio_local.py.
result
(venv) F:\Unique3D-main\venv\Unique3D>python gradio_app\gradio_local.py --port 7860
Traceback (most recent call last):
File "F:\Unique3D-main\venv\Unique3D\gradio_app\gradio_local.py", line 20, in
from gradio_app.gradio_3dgen import create_ui as create_3d_ui
File "F:\Unique3D-main\venv\Unique3D.\gradio_app\gradio_3dgen.py", line 5, in
from pytorch3d.structures import Meshes
ModuleNotFoundError: No module named 'pytorch3d.structures'
I do not know how to install pytorch3d in a virtual environment on Windows.This must be asked on the pytorch3d side.

@turugi-ni
Copy link
Author

Unique3D has too many dependencies of dependencies and more dependencies of dependencies I gave up installing on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants