Skip to content

Pynecone Doesn't Support Windows (Yet) #113

Closed

Description

@ileka2468

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

Activity

  1. picklelo commented on Dec 15, 2022

    @picklelo
    Contributor

    Thanks for creating this, our priority right now is to get Windows support working.

    Can you:

    • Confirm that the command npm is installed on your machine
    • If it is, can you try to run cd .web; npm install and report the output?
  2. added
    bug
    on Dec 15, 2022
  3. ileka2468 commented on Dec 15, 2022

    @ileka2468
    Author

    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.
    
    
  4. Alek99 commented on Dec 15, 2022

    @Alek99
    Member

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

  5. codingthunder commented on Dec 16, 2022

    @codingthunder

    Awesome! I was just coming in to report this same error!

  6. xiaoweigege commented on Dec 16, 2022

    @xiaoweigege

    The reason is that bun does not support windows

  7. Alek99 commented on Dec 16, 2022

    @Alek99
    Member

    Exactly @xiaoweigege on windows we are working on a fix to not use only npm. It will be slower but will allow windows users to run pynecone. Windows users can also use a linux subsystem and it should work current on v0.1.8

  8. codingthunder commented on Dec 16, 2022

    @codingthunder

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

  9. codingthunder commented on Dec 16, 2022

    @codingthunder

    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.

  10. ileka2468 commented on Dec 16, 2022

    @ileka2468
    Author

    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.

    I'm not going to lie. A guide would be really great, but reiterating what you said if its gonna be fixed tomorrow, than you probably shouldn't waste your time :)

  11. Alek99 commented on Dec 16, 2022

    @Alek99
    Member

    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.

    Ok awesome glad to hear you have a working version in the meantime! We started implementing it in the v0.1.10 release we just published. It's not done yet by any means, we found it works about 50% of the time, and we are still working out the bugs.

    @codingthunder Sure, we'd really appreciate a walk-through for some of the other users in the meantime. This would be really helpful because although I think we can get something up in the next week or so for windows, the Linux version will be less bug prone while we are making windows stable.

  12. picklelo commented on Dec 16, 2022

    @picklelo
    Contributor

    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.

  13. changed the title [-]FileNotFoundError when trying to run[/-] [+]pc run not working on Windows[/+] on Dec 16, 2022
  14. 15 remaining items

  15. unpinned this issue on Dec 19, 2022
  16. pinned this issue on Dec 22, 2022
  17. unpinned this issue on Dec 23, 2022
  18. pinned this issue on Dec 27, 2022
  19. ElijahAhianyo commented on Dec 28, 2022

    @ElijahAhianyo
    Contributor

    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 [email protected]: 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)

  20. added this to the milestone on Jan 19, 2023
  21. linked a pull request that will close this issueAdd windows support #290on Jan 19, 2023
  22. unpinned this issue on Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions