Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Python magic-wormhole on Windows.
::
:: This script installs wormhole (https://github.com/warner/magic-wormhole) and
:: its prerequisites. Run this as an administrator.
::
:: Install chocolatey.
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
:: Install Python 3.
choco install -y python
:: Install Microsoft Visual C++ Build Tools 2015.
choco install -y vcbuildtools
:: Refresh environment variables so that we can call Python (this is not a
:: native shell command: it is a script installed as part of chocolatey).
call RefreshEnv
:: Install wormhole.
pip install magic-wormhole
@ReubenBTalbott

This comment has been minimized.

Copy link

@ReubenBTalbott ReubenBTalbott commented Nov 6, 2018

Thanks, now I don't have to mess with finding out how to do this ;-)

@viorelvintan

This comment has been minimized.

Copy link

@viorelvintan viorelvintan commented Mar 3, 2019

Works like a charm, thanks a lot!

@NovacomExperts

This comment has been minimized.

Copy link

@NovacomExperts NovacomExperts commented Aug 14, 2019

Perfect ! Good job !

@larsknutson

This comment has been minimized.

Copy link

@larsknutson larsknutson commented Nov 26, 2019

Thanks

@Phokopi

This comment has been minimized.

Copy link

@Phokopi Phokopi commented Apr 14, 2020

Thank you, works like a charm on W10.

@Emile466

This comment has been minimized.

Copy link

@Emile466 Emile466 commented Apr 16, 2020

It didn't work for me, It didn't give an error or anything but wormhole still isn't recognised as a command :(

@reboot81

This comment has been minimized.

Copy link

@reboot81 reboot81 commented May 12, 2020

It didn't work for me, It didn't give an error or anything but wormhole still isn't recognised as a command :(

Your Powershell is probably not using TLS 1.2. See https://gist.github.com/reboot81/e5392529d2782939cb2aa1a305e1e002

@LuisVillamil1977

This comment has been minimized.

Copy link

@LuisVillamil1977 LuisVillamil1977 commented May 17, 2020

It worked perfectly, thank you so much :)

@HenkPoley

This comment has been minimized.

Copy link

@HenkPoley HenkPoley commented Oct 19, 2020

Would there be an easy way to package this, without installing all those toolchains on the target system? (choco, VC++ compiler, all of Python 3.x)

Edit: pyinstaller doesn't work:

PS C:\Python38\Lib\site-packages\wormhole\dist> .\wormhole.exe receive 1234-pass-phrase
Traceback (most recent call last):
  File "wormhole.py", line 11, in <module>
ImportError: attempted relative import with no known parent package
[17548] Failed to execute script wormhole
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.