Setting up OctoPrint on Windows

Here is a video I created walking through the basics of the process. How to install OctoPrint on Windows 10 (& Run Multiple Instances) - YouTube
Im no expert but might help someone!

1 Like

On my system I get as far as py -m venv venv and all it does is come straifght back to the command prompt. I don't get the venv prompt. (this is running on a 3rd Gen i5 with 8GB RAM and 120GB SSD with Win 10 Pro 20H2)

py --version brings up Python 3.10.0 and as far as I can see I have everything else installed as it should be.

There's probably something simple that I either didn't know about or haven't seen yet that needs to be done - anyone got any ideas?

Rototype.

You missed the 3rd command in the list:

venv\Scripts\activate.bat

OK, got it now. It wasn't clear that the command prompt would come up again after the second command and that the 3rd command needed to be typed in there, I was expecting a different command prompt.

so i followed this guide.... however the setup wizard does not show up? and im at a lost as to what to do, i had octopi set up before but now i have a dedicated pc for the printer but i like the aspect of being able to access my printer remotely

not sure what i did wrong but the initial setup wizard doesnt launch at all

If you had OctoPrint setup on your Windows PC before, it will have found the old configuration.

You can delete the configuration by browsing to %APPDATA%\OctoPrint - this works in the search bar automatically, or the full path (for me) is C:\Users\charl\AppData\Roaming\OctoPrint.

I followed the install instructions for Windows... I've don't it once on a RPI but the same printer... I followed the instructions for a PC install and once I get to the end to launch the server and login I don't get the setup wizard

Hello.
I am running Octoprint from my windows, and had it set up just fine, though after a recent update my custom made batch command files have ceased to work. They were made for me to be able to restart and shut down Octoprint instance from the UI.
Now the server does not recognize specified command like (exit).

I created a batch file from an example found somewhere on the internet.

@echo off
cls
if octoprint.==. goto error
taskkill /f /im octoprint.exe > nul
goto exit
:error
echo Oops... something went wrong!

and the restart command now restarts a whole another instance and not the one that is actually running. Can You help please?

I cant seem to get a second one to work as event viewer says Failed to start service OctoPrint2. Program C:\Program Files\OctoPrint2\venv\Scripts\octoprint.exe couldn't be launched. CreateProcess() failed: The system cannot find the file specified.

yet it is there

After the update I had the same issue. I solved it by replacing octoprint.exe with python.exe
This is my script

@echo off
cls
if octoprint.==. go to error
taskkill /f /im python.exe > nul
timeout /t 3 /nobreak > nul
start C:\OctoPrint\venv\Scripts\octoprint.exe
echo restart complit
goto exit

Alright. Thank You very much for Your input kind person.

I'm having trouble getting OctoPrint installed. Everything goes fine until I get to step 6 and issue "pip install octoprint". Even that goes well until "running setup.py install for netifaces" and it errors. Is there an easy fix for this? I know nothing about python or octoprint (yet); I'm just following the instructions and need beginner-level help.

Thanks!

Here's the complete message:

Running setup.py install for netifaces ... error
error: subprocess-exited-with-error

Γ— Running setup.py install for netifaces did not run successfully.
β”‚ exit code: 1
╰─> [9 lines of output]
running install
running build
running build_ext
building 'netifaces' extension
creating build
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 -DNETIFACES_VERSION=0.11.0 -IC:\OctoPrint\venv\include -IC:\Users\Ray\AppData\Local\Programs\Python\Python310\include -IC:\Users\Ray\AppData\Local\Programs\Python\Python310\Include /Tcnetifaces.c /Fobuild\temp.win-amd64-3.10\Release\netifaces.obj
error: command 'cl.exe' failed: None
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Γ— Encountered error while trying to install package.
╰─> netifaces

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Hi, did you end up getting this sorted? I'm having the same issue.
Cheers

Usually errors building netifaces (one of the dependencies) is to do with the Visual Studio Build Tools not being properly installed (Step 2).

Thanks. I just did a repair install (since I already installed VS Build Tools the other day) and it went through the lengthy install of 314 packages. I saw no error messages and the process requested a restart of Windows. I assume that indicates a successful install. I completed steps 3, 4 and 5 without obvious error (although my version of Python is 3.10.4). Same failure. I'm pretty sure I've done everything correctly but I'm open to suggestions.

I've reinstalled both Python 3.10.4 and VS Builf Tools several times and cannot get past this error. I cannot find cl.exe on my machine which is presumably why step 6 is failing. Might there be additional requirements for Python version 3.10 than what is described in the instructions?

It's a tricky one to try and solve - I'm using Python 3.10 with the same setup, and it works fine. So not really sure what's going on there in your install.

From my searching, cl.exe is the Microsoft C compiler. Which should be installed with the build tools 'Desktop Development with C++' package installed.

On my install (Win11, Build tools 2022) with the options checked as described the path to cl.exe is such:

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.30.30705\bin\Hostx86\x86\cl.exe

(It's actually there 4 times, with different combinations of Hostx86/Hostx64)

There it is. Not sure why my search didn't find it, but following your path on my machine, I do find cl.exe. That folder is not in my path, though, which may be why setup.py fails. Yes, it's the C compiler and I assume it got installed with the Build Tools. It's dated yesterday so it's not an old copy from a previous install. I renamed cl.exe so setup couldn't find it and I get the exact same error so I assume the problem is not that cl.exe is trying to run and fails but that setup is not finding cl.exe in the first place.

Have you found this post on StackOverflow? You could try opening it with the visual studio terminals to see if it sorts out the path for the install to go through.