Setting up OctoPrint on Windows

This is a great thread! I'm also in the camp of "I had a windows 10 device lying around" I update mine a bit differently as I had SteveM help me out on the Google Plus forums. He always did a clean reinstall. It's worked so far for me. I really appreciate the community here. I love my OctoPrint!

Open a CMD prompt
Type cd c:\OctoPrint
Type virtualenv venv
Type venv\Scripts\activate.bat

c:>cd c:\OctoPrint
c:\OctoPrint>virtualenv venv
New python executable in c:\OctoPrint\venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.
Overwriting c:\OctoPrint\venv\Scripts\activate with new content
Overwriting c:\OctoPrint\venv\Scripts\activate.bat with new content

c:\OctoPrint>venv\Scripts\activate.bat

Type git pull && python setup.py clean && python setup.py install

(venv) c:\OctoPrint>git pull && python setup.py clean && python setup.py install

...Bunch Of Stuff...

Using c:\octoprint\venv\lib\site-packages\pytz-2017.3-py2.7.egg
Finished processing dependencies for OctoPrint==1.3.6

(venv) c:\OctoPrint>

Type octopring serve

(venv) c:\OctoPrint> octoprint serve
2017-12-27 14:08:45,977 - octoprint.startup - INFO - ******************************************************************************
2017-12-27 14:08:45,982 - octoprint.startup - INFO - Starting OctoPrint 1.3.6
2017-12-27 14:08:45,983 - octoprint.startup - INFO - ******************************************************************************

...Bunch More Stuff...

I will point out that there are two scopes for applications on Windows and UNIX (which includes Raspbian/Ubuntu/OSX):

Global-scope vs. owner User-scope vs. owner
Raspian /usr/bin /home/pi/
root pi
OSX /Applications /Users/me/Applications
root me
Windows C:\Program Files or C:\Program Files (x86) C:\Users\you
Administrator you

The OctoPi image of OctoPrint appears to be installed into the user scope of pi. Since OctoPrint runs under the security context of this user, it would have all read/write/execute rights to anything that it would need to do within this folder's control. The only other things that OctoPrint needs to do is to run shutdown, reboot which are outside of the user scope; Guy has taken care of that, though, in his scripts which make the OctoPi image.

So now, you're attempting to install OctoPrint at the global scope ("C:\OctoPrint") rather than within the user scope of yourself or by creating another user called pi and putting it under that user's home directory. In short, Windows and Microsoft don't really think you should be doing this. Their preferred method would be for you to decide if it's 32-bit or 64-bit and to put it into one of the two program filesβ€”related areas mentioned in the table above. And then, they expect that your program's application be in a hidden folder off the root, etc.

You may find that you have to right-mouse click cmd and "Run as administrator" for all this to work correctly. It might technically work for you but it is to be noted that this unnecessarily runs all of OctoPrint as Administrator (root) throughout. If you were to install a plugin with evil intent, it could do almost anything. Best practice is to run things with the least overall rights and without elevating the user privileges to root unless a single task is necessary (and then only for that task).

1 Like

Hi is there also a way to use a relay for the power supply.

From a Windows-based installation of OctoPrint, it's not as easy.

but is you use a usb relay you dont need the gpio pins but you need to change the program and that is were i have a problem

And a arduino with a esp 8266

Ok. So I've now installed it on both windows and Raspberry.

The Instructions here are great. Very easy to get this up and running. If you are going to do long prints be aware that windows 10 is much more difficult to prevent auto reboots but it is doable.

Raspberry Setup is fewer steps but in the end they are both easy to set up and the interface is the same once you are in.

Web cam setup is much easier on the Raspberry pi. Basically plug in the camera and it just works. Windows you need to install and set up YawCam and then connect the two.

For me I'm going to stick with the Raspberry pi but only because I forgot why I got that machine for free. It has stability issues and restarts randomly. Some kind of hardware issue that my work couldn't figure out.

Thanks for all of the help. Of course this means I've stolen my son's raspberry until I can pick up another one.

Check the microUSB power connection to make sure that it's snug. A company I worked for got in a batch where the connector side was quite loose.

Thank you for this! I was just following the instructions and didn't want to mess up if my syntax was incorrect. That's why I installed it at C:

I guess I've been lucky and have not had my server restart for updates. I remote into it every so often and there are updates waiting, but it doesn't restart. My longest print so far has been 50 hours and I'm more worried about a hiccup in the power grid than anything else.

Ricky

You also need to worry about Microsoft's fondness for automatically adding updates (say, on a Sunday night) just because it feels like it. Check your update settings and adjust to turn off the automatic application of same.

Check the power-saving settings and turn them all off, especially the part where it turns off the hard drive.

Absolutely, I've turned all of those off. I've been running it since December and I have never had a print fail due to a update or restart. It's working fantastic.

Ricky

Hi. I simply cannot get the webcam streaming to work. I have Yawcam installed, and it seems to be working. I can collect the HTTP and streaming information from it, but when I use it as you've shown in your screenshots, I get a modal saying, " If you see your webcam stream below, the entered stream URL is ok." There's a little broken image marker next to that with the URL I used in the Octoprint settings.

I think I may be missing something basic. This kind of installation and the software are very new to me. If this has already been addressed, I would appreciate being pointed in the right direction.

1 Like

@obeydesign Are you trying to use the IE browser? It's not compatible with the <img src="yourwebcamurlhere"> technique that OctoPrint uses. Try another browser.

Thanks for responding. I'm using Chrome on Windows 10. Do you suspect it will only work with IE/Edge? I'm loathe to use Edge. Maybe Firefox for Windows?

It should work on Chrome, Firefox and possibly others. I just know that IE definitely won't allow an IMG tag to do (what they call) "objects".

1 Like

I misread your first post, and so misposted in response. I'm using Chrome, which I can't get to work. I think there's something browser-issue based not working, as I can see the camera's feed using the camera software and get their stream and http addresses.

If you're feeling kind, I'll take a screenshot of the modal and show you what I'm getting. Thanks again!

novideo

If I right click on the broken image icon and choose open in new window, i get a working video window. Is that the way this is supposed to work?


limited to three replies...

I tried Firefox, and I got further along--now there's a big black box telling me theis

Webcam stream not loaded

It might not be configured correctly or require authentication. You can change the URL of the stream under "Settings" > "Webcam & Timelapse" > "Stream URL". If you don't have a webcam just set the URL to an empty value.

Currently configured stream URL: http://192.168.2.11:8081/video.mjpg

So, the tabs are there now, but this?

β€”β€”β€”β€”β€”β€”β€”β€”β€”
Do I have to have a printer installed and running for this feature to work? I don’t have one at the moment and was preparing the software for when I do.

1 Like

Interestingly, it looks like Chrome is doing the same thing that IE would do. (By taking the URL out of the IMG tag and running it in a tab by itself, the browser doesn't restrict what sort of mime type it wants to be.)

Try yet another browser and see if that works.


Another thing that would behave like this is if there's an http-versus-https mismatch. If your webcam is HTTPS and OctoPrint is HTTP or vice versa, in other words.

1 Like

I just tried this and mine works regardless of whether the printer is connected or not.