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

Install Error on Windows #26

Open
mengqi-z opened this issue Nov 10, 2023 · 7 comments
Open

Install Error on Windows #26

mengqi-z opened this issue Nov 10, 2023 · 7 comments

Comments

@mengqi-z
Copy link

I encountered the following error when installing gcamwrapper on Windows with pip install .. It seems Windows does not support os.uname.

Processing c:\workspace\github\gcamwrapper
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\WorkSpace\github\gcamwrapper\setup.py", line 24, in <module>
          JAVA_PLATFORM_INCLUDE = JAVA_INCLUDE + '/' + os.uname()[0].lower()
                                                       ^^^^^^^^
      AttributeError: module 'os' has no attribute 'uname'. Did you mean: 'name'?
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.
@daleihao
Copy link

Hi @mengqi-z, can you successfully install gcamwarpper-python in windows for gcam7? I got some errors related to tbb. Did you encounter similar issues as below:

Creating library build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.lib and object build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.exp
      get_data_helper.obj : error LNK2001: unresolved external symbol "private: static class tbb::detail::d1::enumerable_thread_specific<double *,class tbb::detail::d1::cache_aligned_allocator<double *>,0> Value::sCentralValue" (?sCentralValue@Value@@0V?$enumerable_thread_specific@PEANV?$cache_aligned_allocator@PEAN@d1@detail@tbb@@$0A@@d1@detail@tbb@@A)
      build\lib.win-amd64-cpython-311\gcam_module.cp311-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals

@mengqi-z
Copy link
Author

Hi @daleihao, Yes, I installed gcamwrapper for GCAM7 on Windows successfully after solving several different issues. I can't remember if I ran into the exactly same error you posted.

@daleihao
Copy link

Hi @mengqi-z , happy to know you installed it successfully. I want to ask whether you use visual studio to compile it and which tbb version do you use for the installation? When you compiled GCAM7, did you disable GCAM Parallel by setting CAM_PARALLEL_ENABLED=0 following https://jgcri.github.io/gcam-doc/gcam-build.html? Thanks a lot!

@mengqi-z
Copy link
Author

Hi @daleihao, I used visual studio to compile it. I believe I used oneapi-tbb-2021.2.0-win.zip. But to be honest, I am not 100% sure because I already deleted the downloaded zip file, and I cannot find the exact version info from my current tbb library.

I didn't disable GCAM Parallel by setting CAM_PARALLEL_ENABLED=0.

@daleihao
Copy link

Got it. Thanks! @mengqi-z Do you have some notes for debugging the issues when installing it in Windows?

@whitenightZhang
Copy link

whitenightZhang commented May 23, 2024

Hi @mengqi-z, can you successfully install gcamwarpper-python in windows for gcam7? I got some errors related to tbb. Did you encounter similar issues as below:

Creating library build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.lib and object build\temp.win-amd64-cpython-311\Release\src\gcam_module.cp311-win_amd64.exp
      get_data_helper.obj : error LNK2001: unresolved external symbol "private: static class tbb::detail::d1::enumerable_thread_specific<double *,class tbb::detail::d1::cache_aligned_allocator<double *>,0> Value::sCentralValue" (?sCentralValue@Value@@0V?$enumerable_thread_specific@PEANV?$cache_aligned_allocator@PEAN@d1@detail@tbb@@$0A@@d1@detail@tbb@@A)
      build\lib.win-amd64-cpython-311\gcam_module.cp311-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals

@daleihao I have the same problem and after changing several tbb versions it is still not solved . May I ask if you have solved this problem?

@whitenightZhang
Copy link

Hi @daleihao, I used visual studio to compile it. I believe I used oneapi-tbb-2021.2.0-win.zip. But to be honest, I am not 100% sure because I already deleted the downloaded zip file, and I cannot find the exact version info from my current tbb library.

I didn't disable GCAM Parallel by setting CAM_PARALLEL_ENABLED=0.

@mengqi-z Would it be convenient for you to send up a package of your current tbb files? so that we can troubleshoot if it's a problem with the tbb version.

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