Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build instructions from ReadMe.md don't work on Windows #5616

Closed
Jaykul opened this issue Jul 8, 2017 · 8 comments
Closed

Build instructions from ReadMe.md don't work on Windows #5616

Jaykul opened this issue Jul 8, 2017 · 8 comments

Comments

@Jaykul
Copy link

Jaykul commented Jul 8, 2017

  1. The line source activate beakerx needs to be just activate beakerx

  2. The line: ./gradlew --no-daemon :beakerx:install has to be run as administrator in order to make symlinks...

  3. The line python -m beakerx.install --enable --prefix="${CONDA_PREFIX}" would need to be `python -m beakerx.install --enable --prefix="%CONDA_PREFIX%"

@Jaykul
Copy link
Author

Jaykul commented Jul 8, 2017

Here's a PowerShell version that definitely works (assuming conda and yarn are pre-installed, and that you're running elevated):

conda create -y -n beakerx python=3.5 jupyter pandas
# activate beakerx # seems to work, but doesn't leave CONDA_PREFIX set
cmd.exe /c "activate beakerx && set > beaker.env"
gc .\beaker.env | ForEach { $name,$value = $_ -split "=",2; sc Env:$name $value }

conda install -y -c conda-forge openjdk
./gradlew --no-daemon build
./gradlew --no-daemon kernelInstall
./gradlew --no-daemon :beakerx:install 
cd beakerx
pip install -e .
python -m beakerx.install --enable --prefix="${CONDA_PREFIX}"
jupyter notebook

I think this works for DOS:

conda create -y -n beakerx python=3.5 jupyter pandas
activate beakerx
conda install -y -c conda-forge openjdk
./gradlew --no-daemon build
./gradlew --no-daemon kernelInstall
./gradlew --no-daemon :beakerx:install
cd beakerx
pip install -e .
python -m beakerx.install --enable --prefix="%CONDA_PREFIX%"
jupyter notebook

@altavir
Copy link

altavir commented Jul 9, 2017

Here is the slightly modified version that allows to skip tests and not to reset gradle daemon each time:

conda create -y -n beakerx python=3.5 jupyter pandas
# activate beakerx # seems to work, but doesn't leave CONDA_PREFIX set
cmd.exe /c "activate beakerx && set > beaker.env"
gc .\beaker.env | ForEach { $name,$value = $_ -split "=",2; sc Env:$name $value }

conda install -y -c conda-forge openjdk
./gradlew --no-daemon build kernelInstall :beakerx:install -x test
cd beakerx
pip install -e .
python -m beakerx.install --enable --prefix="${CONDA_PREFIX}"
cd ..
#jupyter notebook

I've created a file named install.ps1 and now can run it from installation directory. For now the only problem is that groovy kernel fails to build.

@altavir
Copy link

altavir commented Jul 10, 2017

I've performed some additional searches. It seems to be this problem with changing environments: conda/conda#1519

@Jaykul
Copy link
Author

Jaykul commented Jul 10, 2017

Yes @altavir, that's exactly it.

People need to stop using cmd -- especially people who're trying to write cross-platform things.

I have Bash on Windows, and I even have PowerShell on Linux -- but CMD is dead to me 😉 I gave them a tip to do roughly the same thing I showed above to slurp up the environment changes from the cmd process...

Fwiw, my groovy kernel works and everything. The only thing that made me sad was realizing that the %%magic commands wouldn't automatically pickup all my kernels and let me mix-and-match whatever I wanted 😖

I'm working on a cross-platform PowerShell kernel for Jupyter, but I love the polyglot story of Beaker -- are there docs of how you implemented the communication? I mean, what would a Beaker-compatible kernel need to do beyond what Jupyter requires?

@altavir
Copy link

altavir commented Jul 10, 2017

The same for me. I also have bash installed on windows, though I mostly use it for ssh only, since powershell is much more... well... powerful and concise (it also supports pretty large POSIX subset not to feel any difference). I want to use Powershell on Linux also, but I am waiting for a repository debian release.

@scottdraves
Copy link
Contributor

Thanks for the report. we are stuck with what conda does but we can make it correct and document the windows workarounds at least.

@pescadorbob
Copy link

Here's a PowerShell version that definitely works (assuming conda and yarn are pre-installed, and that you're running elevated):

conda create -y -n beakerx python=3.5 jupyter pandas
# activate beakerx # seems to work, but doesn't leave CONDA_PREFIX set
cmd.exe /c "activate beakerx && set > beaker.env"
gc .\beaker.env | ForEach { $name,$value = $_ -split "=",2; sc Env:$name $value }

conda install -y -c conda-forge openjdk
./gradlew --no-daemon build
./gradlew --no-daemon kernelInstall
./gradlew --no-daemon :beakerx:install 
cd beakerx
pip install -e .
python -m beakerx.install --enable --prefix="${CONDA_PREFIX}"
jupyter notebook

I think this works for DOS:

conda create -y -n beakerx python=3.5 jupyter pandas
activate beakerx
conda install -y -c conda-forge openjdk
./gradlew --no-daemon build
./gradlew --no-daemon kernelInstall
./gradlew --no-daemon :beakerx:install
cd beakerx
pip install -e .
python -m beakerx.install --enable --prefix="%CONDA_PREFIX%"
jupyter notebook

I've tried this, but, the gradlew doesn't exist anywhere for me. Is it supposed to be executed from a particular directory or something? where are the build.gradle files we're hoping for?

@Jaykul
Copy link
Author

Jaykul commented Oct 15, 2018

gradlew is part of the source 😉

@LeeTZ LeeTZ closed this as completed Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants