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

Installation issue #106

Open
satpalsr opened this issue Jan 24, 2023 · 8 comments
Open

Installation issue #106

satpalsr opened this issue Jan 24, 2023 · 8 comments

Comments

@satpalsr
Copy link

Received error while pip install -e . --verbose
OS: Ubuntu
cuda 11.7 (its working fine with other code/repo, so not likely a cuda issue.)

Using pip 22.3.1 from /home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/pip (python 3.8)
Obtaining file:///home/svox2
Running command python setup.py egg_info
running egg_info
creating /tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info
writing /tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info/SOURCES.txt'
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.7'
package init file 'svox2/csrc/init.py' not found (or not a regular file)
reading manifest file '/tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file '/tmp/pip-pip-egg-info-57_evqkd/svox2.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Installing collected packages: svox2
Running setup.py develop for svox2
Running command python setup.py develop
running develop
running egg_info
writing svox2.egg-info/PKG-INFO
writing dependency_links to svox2.egg-info/dependency_links.txt
writing top-level names to svox2.egg-info/top_level.txt
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-11.7'
package init file 'svox2/csrc/init.py' not found (or not a regular file)
reading manifest file 'svox2.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'svox2.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/home/svox2/setup.py", line 55, in
setup(
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/anaconda3/envs/plenoxel/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
self.install_for_development()
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/develop.py", line 114, in install_for_development
self.run_command('build_ext')
File "/home/anaconda3/envs/plenoxel/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/.local/lib/python3.8/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions
_check_cuda_version(compiler_name, compiler_version)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 382, in _check_cuda_version
torch_cuda_version = packaging.version.parse(torch.version.cuda)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 56, in parse
return Version(version)
File "/home/anaconda3/envs/plenoxel/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 275, in init
match = self._regex.search(version)
TypeError: expected string or bytes-like object
error: subprocess-exited-with-error

× python setup.py develop 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.
full command: /home/anaconda3/envs/plenoxel/bin/python -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
#   import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
#   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
#     manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
    import setuptools
except ImportError as error:
    print(
        "ERROR: Can not execute `setup.py` since setuptools is not available in "
        "the build environment.",
        file=sys.stderr,
    )
    sys.exit(1)

__file__ = %r
sys.argv[0] = __file__

if os.path.exists(__file__):
    filename = __file__
    with tokenize.open(__file__) as f:
        setup_py_code = f.read()
else:
    filename = "<auto-generated setuptools caller>"
    setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/home/svox2/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /home/svox2/

error: subprocess-exited-with-error

× python setup.py develop 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.

@pedrogcmartin
Copy link

I'm having the exact same error! Have you managed to solve it?

@jaeyeol816
Copy link
Contributor

jaeyeol816 commented Jan 30, 2023

I tried a lot to fix this issue, and I finally found out that there is a simple way to fix this.

First, remove your 'plenoxel' conda environment.

Second, set the specific version of pytorch in environment.yml like this.
- pytorch=1.11.0 (line25)

Third, redo the command below

conda env create -f environment.yml
conda activate plenoxel
pip install -e . --verbose

I guess that the latest pytorch version was not well doing with plenoxel. Setting it to 1.11.0 helped this case. (Although, lots of warnings occured)

@krawek
Copy link

krawek commented Jan 30, 2023

Confirmed to have solved it for me as well, thx @jaeyeol816
image

@pedrogcmartin
Copy link

Thanks a lot! It also solved my problem.

@Qingcsai
Copy link

Well, I added it but still not work.

I tried a lot to fix this issue, and I finally found out that there is a simple way to fix this.

First, remove your 'plenoxel' conda environment.

Second, set the specific version of pytorch in environment.yml like this. - pytorch=1.11.0 (line25)

Third, redo the command below

conda env create -f environment.yml
conda activate plenoxel
pip install -e . --verbose

I guess that the latest pytorch version was not well doing with plenoxel. Setting it to 1.11.0 helped this case. (Although, lots of warnings occured)

@matiwas
Copy link

matiwas commented Sep 7, 2023

What worked for me is specifying the cudatoolkit version in addition to the pytorch version. Specifically, I set torch==1.11.0 and cudatoolkit=11.3 in the environment.yml before creating the conda environment.

@gushengbo
Copy link

What worked for me is specifying the cudatoolkit version in addition to the pytorch version. Specifically, I set torch==1.11.0 and cudatoolkit=11.3 in the environment.yml before creating the conda environment.

Hello, I set pytorch=1.11.0 and cudatoolkit=11.3 in the environment.yml. But I still get error.

@bobojiang26
Copy link

What worked for me is specifying the cudatoolkit version in addition to the pytorch version. Specifically, I set torch==1.11.0 and cudatoolkit=11.3 in the environment.yml before creating the conda environment.

Hello, I set pytorch=1.11.0 and cudatoolkit=11.3 in the environment.yml. But I still get error.

Just make it pytorch and cudatoolkit. Let it download the proper version itself. The point is that the torch should match your cuda, torch==1.11.0 may not match tour cuda.

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

8 participants