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

cmakeがインストールしたのに "ModuleNotFoundError: No module named 'cmake'" #33

Closed
Hamakaze1s opened this issue Jul 28, 2022 · 2 comments · Fixed by #60
Closed

Comments

@Hamakaze1s
Copy link

(tc2) PS C:\Users\Hamakaze> pip install pyopenjtalk
WARNING: Ignoring invalid distribution -rotobuf (c:\users\hamakaze\anaconda3\envs\tc2\lib\site-packages)
WARNING: Ignoring invalid distribution -rotobuf (c:\users\hamakaze\anaconda3\envs\tc2\lib\site-packages)
Collecting pyopenjtalk
  Using cached pyopenjtalk-0.2.0.tar.gz (1.5 MB)
  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
  ╰─> [26 lines of output]
      Traceback (most recent call last):
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\runpy.py", line 193, in _run_module_as_main
          "__main__", mod_spec)
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\runpy.py", line 85, in _run_code
          exec(code, run_globals)
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\Scripts\cmake.exe\__main__.py", line 4, in <module>
      ModuleNotFoundError: No module named 'cmake'
      Traceback (most recent call last):
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 163, in get_requires_for_build_wheel
          config_settings, requirements=['wheel'])
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 268, in run_setup
          self).run_setup(setup_script=setup_script)
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 154, in <module>
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\subprocess.py", line 444, in check_returncode
          self.stderr)
      subprocess.CalledProcessError: Command '['cmake', '..', '-DHTS_ENGINE_INCLUDE_DIR=.', '-DHTS_ENGINE_LIB=dummy']' returned non-zero exit status 1.
      [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.
>>> cmake.__version__
'3.22.5'

/issues/31 のようにAdministratorとしてinstallしても同じです

@Yukimoeli
Copy link

Does Python run in a virtual environment? If so, you can try the installation in a normal environment

@Xk-w
Copy link

Xk-w commented Jul 30, 2022

(tc2) PS C:\Users\Hamakaze> pip install pyopenjtalk
WARNING: Ignoring invalid distribution -rotobuf (c:\users\hamakaze\anaconda3\envs\tc2\lib\site-packages)
WARNING: Ignoring invalid distribution -rotobuf (c:\users\hamakaze\anaconda3\envs\tc2\lib\site-packages)
Collecting pyopenjtalk
  Using cached pyopenjtalk-0.2.0.tar.gz (1.5 MB)
  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
  ╰─> [26 lines of output]
      Traceback (most recent call last):
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\runpy.py", line 193, in _run_module_as_main
          "__main__", mod_spec)
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\runpy.py", line 85, in _run_code
          exec(code, run_globals)
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\Scripts\cmake.exe\__main__.py", line 4, in <module>
      ModuleNotFoundError: No module named 'cmake'
      Traceback (most recent call last):
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
          main()
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 163, in get_requires_for_build_wheel
          config_settings, requirements=['wheel'])
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 143, in _get_build_requires
          self.run_setup()
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 268, in run_setup
          self).run_setup(setup_script=setup_script)
        File "C:\Users\Hamakaze\AppData\Local\Temp\pip-build-env-udh288qw\overlay\Lib\site-packages\setuptools\build_meta.py", line 158, in run_setup
          exec(compile(code, __file__, 'exec'), locals())
        File "setup.py", line 154, in <module>
        File "C:\Users\Hamakaze\anaconda3\envs\tc2\lib\subprocess.py", line 444, in check_returncode
          self.stderr)
      subprocess.CalledProcessError: Command '['cmake', '..', '-DHTS_ENGINE_INCLUDE_DIR=.', '-DHTS_ENGINE_LIB=dummy']' returned non-zero exit status 1.
      [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.
>>> cmake.__version__
'3.22.5'

/issues/31 のようにAdministratorとしてinstallしても同じです

I solved this problem in win10 system by adding cmake environment variables and python
asdfasfdasd
hjfghrfdghrfd

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

Successfully merging a pull request may close this issue.

3 participants