How to install Polynote on Windows? - python

I've been searching around the Internet for a while but I have not been able to find detailed instructions on how to install Polynote (The polyglot notebook
with first-class Scala support.) for Windows with mixing multiple languages, Python and Scala.
Github Link for Polynote.
Official Website.
According to Official Website:
Polynote is currently only tested on Linux and MacOS, using the Chrome browser as a client. We hope to be testing other platforms and browsers soon. Feel free to try it on your platform, and be sure to let us know about any issues you encounter by filing a bug report
I would really appreciate it if anyone here can share his/her method if he/she
had successfully installed Polynote on Windows, either from Virtual Machines
(VMware/Virtualbox) or directly.

You could install Polynote on Windows with Ubuntu's subsystem for Windows. To do that, you have to:
Enable Windows Developer mode: Settings > Update & Security > For Developers > Developer Mode.
On Windows Features turn on Windows Subsystem for Linux.
Search for Bash on Ubuntu on Windows in your local search and you will find it.
Otherwise, you can skip the third step by installing Ubuntu 18.0.4 LTS from Window Store which is free and you can run linux commands there. You can actually install any Linux software and it works just as if it was native.
Having installed Ubuntu for Windows, you can just go through the steps on official documentation through the link which you provided us and you will be fine.

Might be a bit late but still maybe helpfull if you can't on WSL or if you easily want to keep polynote up-to-date.
I used docker to run polynote on Windows. Currently I'm reworking the Dockerfile I wrote to automatically update polynote on new releases. But as of now the script to run Polynote works for polynote version (0.3.11). https://github.com/moritzbaumotte/polynote-windows-inofficial
Here you only need docker-compose and docker installed. You can download the repository and execute the batch script. It will create a working docker image and run it, then you can access polynote on http://localhost:8192
The issue with the official docker images imo is the binding to 127.0.0.1 which needs to be 0.0.0.0, hence the config.yml in my repository.

Related

Cross Platform Python Executable - Mac & Windows?

I used pyinstaller to create an executable file (Desktop GUI). I am on Windows, and the person I am sending it to is on Mac.
I was under the impression that pyinstaller was cross platform, but the Mac user gets an error when trying to run the app. What are my options for distributing my GUI for both Windows and Mac?
I have not been able to find a straightforward answer and do not have a Mac to test with. I saw Inno Setup, but haven't found anything saying whether or not it's cross platform.
I need to create a script that can run both Windows and Mac. I am also looking for an easy way to send it electronically.
I have no knowledge of Python but after a quick serach on the internet came up with this which might help you.
A few months ago I went through this process (rather painstakingly I might add) to deploy a simple Xamarin Cross Platform App. In my own experience I have learned that the macOS has very strict rules about how software is to be packaged for deployment on a computer.
If you are using Visual Studio for Mac it will automatically build a packaged installer for you. But, you do have to purchase (at an yearly cost) a Developer ID.
Then, you create specific provision profiles for your application and these are used along with your developer ID to sign your packaged installer. I found it somewhat complicated!
Finally, you follow a procedure via the console on the mac to submit your package for an automatic scan. This is referred to as getting your package notarized (link to a SO question about that process).They provide you a result that then gets stapled to the package.
It is like a double signing. Once this is done then the package can be installed by users using the macOS.
An alternative is that the user run a instance of Windows by using a software package called Parallels. I have to say it is very good and I did enjoy my trial of the software, You can fire up Windows from inside the macOS (no need to reboot) and since it is Windows you can simply run your stahdard installers.
In summary, for the macOS, if you do not correctly sign your package with a developer and application ID, and don't get it notarized and stapled the operating system will throw it back out at you and not run it.

How do I get Python code to run in RStudio? No Python installed in the system

I'm working on a research project where the data is stored in a remote Windows desktop. The desktop does not have Python, it only has Rstudio, but most of the research conducted in this topic was in Python. I want to benchmark already existing implementations, but I can't run the code on the data because there's no Python and this will not change. As far as I understand, tools like reticulate still need an underlying Python interpreter in the system to work and I am not allowed to do that.
Has anyone come up with a smart solution that does not involve me manually translating the python code to R? Any R packages that can read python? Any other out-of-the-box ideas on how to get that code to run on the data?
Can't install Python on Windows? Just Use WinPython
WinPython is a free open-source portable distribution of the Python programming language for Windows 8/10 and scientific and educational usage.
Since it is portable, it is a zero install option. This is probably the best option for you.
https://winpython.github.io/
Once you have WinPython on the machine, if you want to use it with RStudio, you'll need to configure reticulate to use it.
Say you have (1) the remote Windows Desktop that does not have Python and (2) the local computer you work on.
Use the remote Windows Desktop (1) as a git repository, clone that repository on your local machine, make changes to it and run locally using Python, then submit the code to the remote repository again.

How can I make sure the windows update package installed successfully

I write a code in python that simulates a Windows Update installation.
the code is below:
subprocess.call(["c:\Windows\System32\wusa.exe","C:/Users/adib/Downloads/WindowsUp.msu", "/quiet")
Now, I would like to know when the installation over and make sure the update ran successfully..
how can I do that through the script?
thanks!!
Windows update has a COM API that can be used to scan for and install updates. VBScript is listed as explicitly supported; python may also be able to access COM interfaces. Detailed examples in VBscript can be found in Microsoft's documentation.
For more information You should take a look at this topic: Download / Install Windows Updates from Python

How to use Google's repo tool on MS Windows OS?

I installed git for windows and it works fine(e.g. use one of the following solutions Want to download a Git repository, what do I need (windows machine)?).
I tried to use repo of google but it needs gpg and python 2.7. I installed both and it works fine the only problem is that repo script use some unix oriented features such as symbolic links and fcntl. Is there any alternative code of repo for windows?
I couldn't found some native solution by google. if there is one I'll try to push it into google repo git repository or try to use it as is.
Yes, Google repo script can be compliant with Windows. Follow the steps below.
But before, as Borealid said repo as not been ported on Windows. repo (forall.py) uses fcntl that is not available on Windows (Unix only).
However there is Cygwin and its own python and git tools.
If git version from MSysGit project for you or if you love your git GUI that is based on MSysGit only, then follow the following steps. These steps ensure that Cygwin can create native NTFS symlinks. Else if the git from Cygwin is sufficient, you do not have to do it. But it is better as setting CYGWIN=winsymlinks:native tells Cygwin to use native NTFS symlinks instead of old Cygwin workaround.
Use Windows Vista or later (or switch to Linux)
Have Admin privileges
Dowload and install Cygwin (32 or 64 bits)
Select and install python and git (and gpg if you want) from Cygwin installer
Set CYGWIN=winsymlinks:native in your Cygwin shell:
export CYGWIN=winsymlinks:native
mkdir NEW_DIR
cd NEW_DIR
repo init -u YOUR_URL
repo sync -j 7
(see also my other post)
A working repo tool for windows is available here: https://github.com/esrlabs/git-repo
It requires Python 3+ and git 1.7.2+
Btw, the original forked repo version seems pretty old, so it might not contain all current functionalities.
There is an alternative for whoever has a choice to work with an alternative to repo, it's called gclient.
See Google's depot tools:
gclient: Meta-checkout tool managing both subversion and git
checkouts. It is similar to repo tool except that it works on Linux,
OS X, and Windows and supports both svn and git. On the other hand,
gclient doesn't integrate any code review functionality.
There is no native repo for Windows currently.
You may use a Linux virtual machine or dual-boot, or work around the (relatively minor) issues caused by symlinks not functioning on your filesystem.
Another option would be to just use git directly instead of using the repo as a convenience wrapper - repo is a support tool, and doesn't add any substantial power.

Installing Pinax on Windows

Can I install Pinax on Windows Environment?
Is there a easy way?
Which environment do you recommend?
I have pinax 0.7rc1 installed and working on windows 7, with no problems.
Check out this video for a great example on how to do this. He uses pinax 0.7beta3 on windows XP.
http://www.vimeo.com/6098872
Here are the steps I followed.
download and install python
download and install python image library
download pinax at http://pinaxproject.com
extract the download to some working directory <pinax-directory> (maybe c:\pinax ?)
make sure you have python in your path (c:\pythonXX)
make sure you have the python scripts folder in your path (c:\pythonXX\scripts)
open a command prompt
cd to <pinax-directory>\scripts folder
run python pinax-boot.py <pinax-env> (I used "../pinax-env")
wait for pinax-boot process to finish
-- technically pinax is installed and ready to use, but the next steps will get you up and running with pinax social app (any other app will also work fine)
cd to your <pinax-env>\scripts directory
execute the activate.bat script
execute python clone_project social <pinax-env>\social
cd to <pinax-env>\social
execute python manage.py syncdb
execute python manage.py runserver
open your browser to the server and you should see your new pinax site
Voila!! Pinax on Windows.
Provided you have Python and Django installed, Pinax should install fine. According to the documentation there is one step that you have to do specifically on Windows however (Under the "Note To Windows Users" heading):
http://pinaxproject.com/docs/0.5.1/install.html
I spent a while trying to get the .7 beta working in Windows and ran into a lot of trouble. However, it looks like the 3rd beta release of .7 (the latest beta release) focuses on Windows support. So try that, instead of the 'stable' version - it's close to being released as stable anyway, and is recommended now for use.
In the end though, I switched to Ubuntu and haven't been happier. Python development is much nicer in Linux. It's easier to install many Python packages, I run into fewer configuration issues, and there's better support and documentation available.

Categories

Resources