Repository navigation
Labels
bugSomething isn't working
Description
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
picklelo commentedon Dec 15, 2022
Thanks for creating this, our priority right now is to get Windows support working.
Can you:
npmis installed on your machinecd .web; npm installand report the output?ileka2468 commentedon Dec 15, 2022
This was the output
Alek99 commentedon Dec 15, 2022
Ok thanks I think we know what's causing this working on a fix right now
codingthunder commentedon Dec 16, 2022
Awesome! I was just coming in to report this same error!
xiaoweigege commentedon Dec 16, 2022
The reason is that bun does not support windows
Alek99 commentedon Dec 16, 2022
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
codingthunder commentedon Dec 16, 2022
Good to know. I'll try giving a Linux subsystem a try.
codingthunder commentedon Dec 16, 2022
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.
ileka2468 commentedon Dec 16, 2022
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 :)
Alek99 commentedon Dec 16, 2022
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.
picklelo commentedon Dec 16, 2022
We just released a new version (v0.1.10) where we began experimental support for Windows. The major change is that we use
npminstead ofbunon 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.
[-]FileNotFoundError when trying to run[/-][+]pc run not working on Windows[/+]15 remaining items
ElijahAhianyo commentedon Dec 28, 2022
I had this issue as well. The issue seem to go away when you ran the application in administrator mode (running Powershell as administrator)