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

[Win/MAC] PYTHONPATH does not appear to be set #39

Open
tashrifbillah opened this issue Apr 18, 2020 · 0 comments
Open

[Win/MAC] PYTHONPATH does not appear to be set #39

tashrifbillah opened this issue Apr 18, 2020 · 0 comments

Comments

@tashrifbillah
Copy link
Collaborator

Hi @ihnorton ,

Given these errors on Win and MAC, I believe the PYTHONPATH is not set in AdditionalLauncherSettings.ini:

add_test(NAME diffusionQCCLI_test 
  COMMAND 
  "${Slicer_LAUNCHER_EXECUTABLE}"
  --launcher-additional-settings "${CMAKE_BINARY_DIR}/AdditionalLauncherSettings.ini"
   --launch
  "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/run_test.py"
  )

Learning from what you wrote in the other cmake:

set(_install_diffusionqclib COMMAND ${CMAKE_COMMAND}
    -E env
    PYTHONNOUSERSITE=1
    ${PYTHON_EXECUTABLE} -m pip install . --prefix ${python_packages_DIR_NATIVE_DIR} --upgrade
    )

I would like to manually provide PYTHONPATH:

add_test(NAME diffusionQCCLI_test 
  COMMAND 
  
  # notice the following line
  ${CMAKE_COMMAND} -E env PYTHONPATH=${python_packages_DIR_NATIVE_DIR}
  
  "${Slicer_LAUNCHER_EXECUTABLE}"
  --launcher-additional-settings "${CMAKE_BINARY_DIR}/AdditionalLauncherSettings.ini"
   --launch
  "${PYTHON_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/run_test.py"
  )

Do you think that may work or is the syntax right? Surprisingly, it does not happen on Linux.

It has been a while so it's okay if we have forgotten this. Thank you anyway.

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

1 participant