Augustin YAICH

02/10/2023, 10:47 AM
Hi everyone, I am trying to add a code location to Dagster Cloud serverless using on my local machine (Windows) the following cli command :
dagster-cloud serverless deploy-python-executable --location-name dagster-media --package-name dagster_media
Unfortunatly I encounter this error:
Building Python executable for directory C:\Users\ayaich\Documents\Code\media-orchestration\dagster_media for Python 3.8.
ERROR:root:Failed to build deps.pex
ERROR:root:Traceback (most recent call last):
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\", line 6, in <module>
    from pex.bin import pex
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\bin\", line 29, in <module>
    from pex.interpreter_constraints import InterpreterConstraints
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\", line 13, in <module>
    from pex.interpreter import PythonInterpreter
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\", line 26, in <module>
    from pex.pep_508 import MarkerEnvironment
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\", line 6, in <module>
    from pex.platforms import Platform
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\", line 12, in <module>
    from pex.atomic_directory import atomic_directory
  File "C:\Users\ayaich\Anaconda3\envs\dagster_serverless\lib\site-packages\pex\", line 7, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'
After a quick search, I found that fcntl module is not available on Windows... Any idea on how to to get around this error?


02/10/2023, 5:20 PM
Hi Augustin, you might try the
flag which will build the PEX in a linux container, that may fix your issue. Alternatively, you can use the
(rather than
) command to build a Docker image instead of a PEX.
❤️ 1

Augustin YAICH

02/10/2023, 6:33 PM
Thank you very much ben, I will try that