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

Cannot install on ends that do not have dependencies installed #2

Open
prescod opened this issue Dec 7, 2023 · 10 comments · May be fixed by #5 or #26
Open

Cannot install on ends that do not have dependencies installed #2

prescod opened this issue Dec 7, 2023 · 10 comments · May be fixed by #5 or #26

Comments

@prescod
Copy link

prescod commented Dec 7, 2023

pip 23.3.1 from /private/tmp/mamba-chat/venv/lib/python3.11/site-packages/pip (python 3.11)

% pip install causal-conv1d
Collecting causal-conv1d
  Using cached causal_conv1d-1.0.0.tar.gz (6.4 kB)
  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
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/private/tmp/mamba-chat/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/private/tmp/mamba-chat/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/tmp/mamba-chat/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/5l/v33xmdnn2sx5lb2xpff6v4t40000gn/T/pip-build-env-gk93e613/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/5l/v33xmdnn2sx5lb2xpff6v4t40000gn/T/pip-build-env-gk93e613/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/5l/v33xmdnn2sx5lb2xpff6v4t40000gn/T/pip-build-env-gk93e613/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/5l/v33xmdnn2sx5lb2xpff6v4t40000gn/T/pip-build-env-gk93e613/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 8, in <module>
      ModuleNotFoundError: No module named 'packaging'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
@havietisov
Copy link
Contributor

Same error on windows, btw, despite "packaging" being successfully installed

@marcusze
Copy link

marcusze commented Dec 7, 2023

same here..

@havietisov
Copy link
Contributor

Sounds like I know what's the issue : you need to install setuptools and buildtools, and then you can install it

havietisov added a commit to havietisov/causal-conv1d that referenced this issue Dec 7, 2023
@havietisov
Copy link
Contributor

made a merge request with a fix

@prescod
Copy link
Author

prescod commented Dec 8, 2023

I am skeptical about that pull request. It changes line 258 of setup.py, but the crash happens when Python tries to run lines 8, 11 and 18.

Instead, I made a pyproject.toml with this content:

[build-system]
requires = ["packaging", "torch", "setuptools", "wheel"]

This seems to install the four requirements before running setup.py.

@prescod prescod changed the title Cannot install on Mac Cannot install on ends that do not have dependencies installed Dec 8, 2023
@havietisov
Copy link
Contributor

I can't see *.toml project files in the original repo, so I just asked for a pull request with minimal changes. lets you install this at least from source. I also have no experience with *.toml. If you have ideas for improvements, I guess you're free to create pull requests!

@danstowell
Copy link

Just to comment that I also had this same problem. I'm on Ubuntu 22.04 using virtualenv. I already have setuptools (from apt). I was able to proceed a bit further by doing a few pip installs... but I'm not fully installed yet.

@plasma-vision
Copy link

I was able to resolve this by running $ pip install wheel
I think the packaging error is spurious.

@ajie220209
Copy link

听起来我知道问题出在哪里:您需要安装 setuptools 和 buildtools,然后才能安装它

Even though I have setuptools and buildtools installed, I still get an error when I run them.I think setuptools and buildtools are probably not the problem.
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
C:\Users\cwj.conda\envs\vmunet\Lib\site-packages\causal-conv1d\setup.py:78: UserWarning: causal_conv1d was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/py
torch/pytorch, only images whose names contain 'devel' will provide nvcc.
warnings.warn(
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\cwj.conda\envs\vmunet\Lib\site-packages\causal-conv1d\setup.py", line 112, in
if bare_metal_version >= Version("11.8"):
NameError: name 'bare_metal_version' is not defined

  torch.__version__  = 2.1.1+cu118
 
 
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@Ley-lele
Copy link

听起来我知道问题出在哪里:您需要安装 setuptools 和 buildtools,然后才能安装它

Even though I have setuptools and buildtools installed, I still get an error when I run them.I think setuptools and buildtools are probably not the problem. Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [13 lines of output] C:\Users\cwj.conda\envs\vmunet\Lib\site-packages\causal-conv1d\setup.py:78: UserWarning: causal_conv1d was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/py torch/pytorch, only images whose names contain 'devel' will provide nvcc. warnings.warn( Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\cwj.conda\envs\vmunet\Lib\site-packages\causal-conv1d\setup.py", line 112, in if bare_metal_version >= Version("11.8"): NameError: name 'bare_metal_version' is not defined

  torch.__version__  = 2.1.1+cu118
 
 
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

听起来我知道问题出在哪里:您需要安装 setuptools 和 buildtools,然后才能安装它

Even though I have setuptools and buildtools installed, I still get an error when I run them.I think setuptools and buildtools are probably not the problem. Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [13 lines of output] C:\Users\cwj.conda\envs\vmunet\Lib\site-packages\causal-conv1d\setup.py:78: UserWarning: causal_conv1d was requested, but nvcc was not found. Are you sure your environment has nvcc available? If you're installing within a container from https://hub.docker.com/r/py torch/pytorch, only images whose names contain 'devel' will provide nvcc. warnings.warn( Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\cwj.conda\envs\vmunet\Lib\site-packages\causal-conv1d\setup.py", line 112, in if bare_metal_version >= Version("11.8"): NameError: name 'bare_metal_version' is not defined

  torch.__version__  = 2.1.1+cu118
 
 
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

I have the same problem with u. Have u sovled it?

@kszlim kszlim linked a pull request Jun 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants