How do I start Spark's Shell on Window's 8.1? - scala

I keep trying to get the Spark shell running to no avail.
OS: Windows 8.1
Spark: 1.3.1
Java: 8
Downloaded both prepackaged and unpackaged variants (unpackaged variant built by maven and simple build tool). I've attempted to resolve my issue three different ways to no avail.
1) From my Spark Directory, I attempt to start its shell with variants of spark-shell.cmd or .\bin\spark-shell.cmd.
I consistently get an error along these lines:
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Knowing a possible whitespace error when I see one, I've attempted variants of my command with quotes, full paths, etc. No results thus far.
2) Next, I've tried simply moving my spark directory to highest level of my harddrive (C:\ \spark-1.3.1-bin-hadoop2.6).
With whitespace eliminated as a possible issue, my error messages now fall along these lines:
find: 'version': No such file or directory
else was unexpected at this time.
3) I've tried to invoke Spark through Scala somehow (as some documents and screencasts given the impression). I can confirm that Scala (2.11.6) is properly configured within my environment variables. Its shell works correctly.
If there's supposedly a command to make it start the Spark shell, I'm listening. Current attempts through Scala is another dead end.
Thank you.

In this file bin\spark-class2.cmd find the line
set RUNNER="%JAVA_HOME%\bin\java"
and replace it with (remove the ")
set RUNNER=%JAVA_HOME%\bin\java

Moving Spark directory under C:\ worked for me.(C:\spark-1.6.0-bin-hadoop2.6).
I also updated the system's PATH variable for find.exe

To solve the C:\Program is not recognized, change C:\Program Files to C:\Progra~1, which is an alias for C:\Program Files.

Apart from moving Spark & Scala to C:\ , I had to move java installation to C:\ as well

I just attempted to install Spark On my Windows 8.1 laptop. I followed the instructions given in the Safari online Video titled "Apache Spark with Scala":
Apache Spark With Scala
After following the simple instructions the "spark-shell" command refused to work at all. I tried everything, reinstalling, changing directory names ... blah blah. I even attempted to rewrite the maze of intertwinning shell scripts that bring it up. All with no success. Finally I tried to install an earlier release.
I installed the "2.1.0:" release instead of the 2.1.1.
EVERYTHING WORKED THEN.
This seems to imply that the windows .cmd commands are totally broken in the 2.1.1 release:

Related

How do I specify the java version to use with the Ammonite Scala shell on Windows?

I am working on an enterprise system where I can't control my system Path environment variable, and the system path points to a version of Java that is currently broken. I have another version of Java installed, and I would like to use that to run the Ammonite shell. Is this possible?
My hacky solution was to rename ammonite from amm.bat to amm-default.bat and create a new batch file called amm.bat that just adds my desired jre to the front of the session Path:
#echo off
set Path=C:\Users\bohlli\.jdks\corretto-1.8.0_292\bin;%Path%
amm_default.bat
I tried changing the path in the ammonite batch script itself, but every time I tried, something broke.

Running MALLET on Windows; could not find or load main class cc.mallet.classify.tui.Text2Vectors

I'm trying to get MALLET running on a 64-bit Windows 10 Enterprise machine from the native command prompt (cmd.exe). (I tried doing everything with Git Bash, but got stuck even earlier in the process.)
What I've done:
Installed JDK 8u281 for 64-bit Windows
Downloaded and installed MALLET 2.0.8 in my C:\
Installed Apache Ant in my C:\Program Files (per this Medium post)
Created new environmental variables
Adjusted my path
Run ant within the MALLET folder (received BUILD SUCCESSFUL)
Run ant jar within the MALLET folder (received BUILD SUCCESSFUL)
Typed bin\mallet, which displays the MALLET commands
However, when I tried to create a .mallet file, using bin\mallet import-dir, I get the error message Error: Could not find or load main class cc.mallet.classify.tui.Text2Vectors.
I (and my students) will appreciate any help in figuring out how to get this running.
This looks like a classpath issue. I'm not sure how Java on Windows handles classpath now. Try setting %MALLET_HOME% to C:\Mallet-2.0.8, not the bin directory? The classes would be in %MALLET_HOME%\class also, perhaps try adding that to %PATH% or %CLASSPATH%?

Can't load cake module - Preprocessor directive expected

I'm trying to run a cake build script that loads a module for long file path but it only returns
error CS1024: Preprocessor directive expected
In the cake file I have added
#module nuget:?package=Cake.LongPath.Module&version=0.5.0
and this is the line where I get the error at (1,2)
In the docs It states that this is the format and that I should run the script with --bootstrap before actually running the script. Running Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" --bootstrap" causes a the error and then I also get it on the line after when running it without the --bootstrap flag.
What I need is to make sure that Cake.LongPath module is installed and loaded in CI. Any thoughts on other solutions would also be helpful
The --bootstrap command was only added in Version 0.24.0 of Cake. You can see the release notes here:
https://github.com/cake-build/cake/releases/tag/v0.24.0
And the issue that it was worked on here:
https://github.com/cake-build/cake/issues/1950
I am fairly sure that this issue will be solved by upgrading to a newer version of Cake. This can be done by changing the version number in the packages.config file, and by clearing out the tools folder. NOTE: Depending on what version of the bootstrapper you are using, the clearing out of the tools folder may be done for you automatically.

Cannot install Qt postgreSQL driver

I'm posting here with the hopes that someone will be kind enough to help me. Just to clarify, I'm sort of a newb, so I'd be really grateful if you give more details to your explanations.
I'm on Windows 10 64 bit, QT 5.9.1, PostgreSQL is 9.6.3 version.
I'm working on a project, where I need to get a postgresql database running and connect it to the code I'm doing right now. Unfortunately, when I try to install the driver, I run into all kinds of problems. I've been reading on threads on sites, but they are outdated and some folders do not match, which my first problem arises. For some reason I cannot get qmake to work, even though I edit the path in the variables.
I tried running the commands from here.
cd %QTDIR%\qtbase\src\plugins\sqldrivers\ps
ql
qmake "INCLUDEPATH+=C:/psql/include" "LIBS+=C:/psql/lib/ms/libpq.lib" psql.pro
nmake
Basically my folders don't aren't 100% as the guide, also I don't have a libpq.lib file
On my final attempt I tried the following:
qmake "INCLUDEPATH+=C:/PostgreSQL/pg96/include" "LIBS+=C:/PostgreSQL/pg96/lib/libpq.lib"
Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?
You'll need to have PostgreSQL installed so you have libpq.lib and libpq.dll. You cannot compile the Qt PostgreSQL driver without these. You'll also need to find the include directory for your PostgreSQL install, the one that contains libpq-fe.h.
Then determine the paths to those. Set the PATH to include the directory with libpq.dll. Set LIBS to include the directory with libpq.lib. And set the INCLUDEPATH to include the directory with libpq-fe.h.
You'll probably need to do this within a "Visual Studio Command Prompt" or run vcvarsall.bat fist, too, so qmake can find Visual Studio.

unable to run php cli from the command line when xampp portable is installed in another drive

I have installed a xampp portable package on my drive D, added the php folder path inside it on the system environment so I would be able to run php basically anywhere from the command line. but when i try to check if its working by executing the "php -v" command, it runs but i get this following error/warning messages.
"Warning: PHP Startup: Unable to load dynamic library 'xampp-portable\php\ext[:any].dll - The specified module could not be found."
*the [:any] there just means some dll filename.
and i get a lot of that warnings with just varying dll filenames,
anyway, here's the catch. when i do change my current path in the command line to somewhere in drive D, and then run the same command "php -v" it runs smoothly.
so what configuration should i do to fix this problem?
by the way, i do the same with mysql, putting its bin directory path on the system enviroment, run it in both inside drive C and drive D. and it runs smoothly. so i guess this problem is only on php.
I've posted the same question in xampp forums and this is the answer that was given to me. I'll be quoting the answer as it was and give credit to the one who answere it.
XAMPP is very proud that it don't have to set any environment
variables or registry values.
What you want to do is not possible with XAMPP portable without
mapping to a specific Drive letter. All configurations in xampp
portable have relative paths, so if you want to use cli from a
different drive letter, php can be executed, but all extensions of
them throw errors.
I would install the full version of XAMPP, map it to the current drive
letter with help of the setup_xampp.bat file and use the XAMPP control
panel Shell instead of default command line (advantage: The XAMPP
control panel shell sets local include paths to the needed XAMPP
folders).
Works for me (i can even use pear, git, composer, and other cli
scripts with the Xampp Shell if correct integrated).
best wishes, Altrea
credits to Altrea
Open your php.ini file, replace all relative paths to absolute paths. Eg: \xampp\ to C:\xampp\