reflex: Pynecone Doesn't Support Windows (Yet)

I get this “FileNotFoundError: [WinError 2] The system cannot find the file specified” when I use the “pc run” command, I tried with my system interpreter and tried with a virtual environment, but still got the same error. I installed node.js and followed the instructions to a tee, but this error persists. Any suggestions?

Full stack trace error message:



[14:02:23] Skipping bun installation on Windows.                                                                                                                                                                            utils.py:375
           Initializing the web directory.                                                                                                                                                                                  utils.py:365
           Initializing the app directory.                                                                                                                                                                                  utils.py:354
           Finished Initializing: app                                                                                                                                                                                           pc.py:47
                                                                                                                                                                                                                                        
C:\Users\Gaming PC\Desktop\New folder (4)\app>pc run
──────────────────────────────────────────────────────────────────────────────────────────────────────── Starting Pynecone App ─────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────────────────────────── Installing frontend packages ─────────────────────────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\users\gaming pc\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\scripts\pc.exe\__main__.py", line 7, in <module>
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\typer\main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\typer\main.py", line 532, in wrapper
    return callback(**use_params)  # type: ignore
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynecone\pc.py", line 87, in run
    frontend_cmd(app.app)
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynecone\utils.py", line 448, in run_frontend
    setup_frontend()
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynecone\utils.py", line 435, in setup_frontend
    install_frontend_packages()
  File "C:\Users\Gaming PC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pynecone\utils.py", line 387, in install_frontend_packages
    subprocess.run([get_bun_path(), "install"], cwd=constants.WEB_DIR, stdout=PIPE)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1440, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified


Python version: 3.10 OS: Windows 11

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (9 by maintainers)

Most upvoted comments

@Alek99 I’ve posted a walkthrough on how to use WSL to get Pynecone up and running. Please let me know if you have any feedback or suggestions. https://www.patreon.com/posts/76017903

A quick update: I got it working on the Linux Subsystem (using Ubuntu). Glad it works!

Do you know what the ETA will be on the Windows fix? If it’s going to be a while, I can probably make a quick walkthrough to get it running on Linux Subsystem. Having never done it before, I know I would’ve appreciated a guide. But if the update is dropping in two days, it wouldn’t be worth writing up.

@Alek99 Sounds good. I’ll try to have something up over the weekend.

The reason is that bun does not support windows

Ok thanks I think we know what’s causing this working on a fix right now

I’m experiencing a similar (I think) issue. Hoping it’s helpful, I’m leaving my terminal log here:

Microsoft Windows [Versione 10.0.22621.963]
(c) Microsoft Corporation. Tutti i diritti riservati.

C:\Users\Giacomo\Desktop\try>pc init
[08:59:13] Skipping bun installation on Windows.                  utils.py:373
           Initializing the web directory.                        utils.py:363
           Initializing the app directory.                        utils.py:352
           Finished Initializing: try                                 pc.py:47

C:\Users\Giacomo\Desktop\try>pc run
─────────────────────────── Starting Pynecone App ────────────────────────────
──────────────────────── Installing frontend packages ────────────────────────
npm WARN deprecated mumath@3.3.4: Redundant dependency in your project.       
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Giacomo\scoop\apps\python\current\Scripts\pc.exe\__main__.py", line 7, in <module>
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\typer\main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\typer\main.py", line 532, in wrapper
    return callback(**use_params)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\pynecone\pc.py", line 87, in run
    frontend_cmd(app.app)
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\pynecone\utils.py", line 450, in run_frontend
    setup_frontend()
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\pynecone\utils.py", line 440, in setup_frontend
    ln(src=os.path.join("..", constants.APP_ASSETS_DIR), dest=constants.WEB_ASSETS_DIR)
  File "C:\Users\Giacomo\scoop\apps\python\current\Lib\site-packages\pynecone\utils.py", line 261, in ln
    os.symlink(src, dest)
OSError: [WinError 1314] Il privilegio richiesto non appartiene al client: '..\\assets' -> '.web\\public'

npm is installed and the command you suggested before gives the same result as this:

This was the output

C:\Users\Gaming PC\Desktop\AppFolder>cd .web

C:\Users\Gaming PC\Desktop\AppFolder\.web>npm install
npm WARN deprecated mumath@3.3.4: Redundant dependency in your project.

added 626 packages, and audited 627 packages in 20s

129 packages are looking for funding
  run `npm fund` for details

3 high severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

Thanks for trying Pynecone out. Yeah seems like the same problem, we are still working on windows integration in the mean time maybe run on wsl. See @codingthunder tutorial here if you haven’t used it before #128.

We should have a stable windows integration soon in the next few weeks.

I had this issue as well. The issue seem to go away when you ran the application in administrator mode (running Powershell as administrator)

We just released a new version (v0.1.10) where we began experimental support for Windows. The major change is that we use npm instead of bun on Windows.

But it’s still a work in progress, it’s proving to be a bit trickier than expected. On our test VM it was occasionally running but we were seeing some flaky errors. We will continue improving it over the next week, but until then WSL would be the most stable option.

If you guys could try out the new version on Windows and report what issues you’re facing, it would really help our development along! Thanks for your patience, we’re really eager to get this working on all platforms.

Good to know. I’ll try giving a Linux subsystem a try.