I am trying to work with excel files with aspose cell so that I can encrypted them but its not working because of Java - jupyter-notebook

import jpype
import asposecells
jpype.startJVM()
from asposecells.api import *
for this code, I get the following error
JVMNotFoundException: No JVM shared library file (jvm.dll) found. Try setting up the JAVA_HOME environment variable properly.
I am doing this through anaconda, in jupyter notebook. I am trying to get the workbook from aspose cell.

It seems configuration issue. Try to setup your environment properly. Make sure to install Java and setup JAVA_HOME and Path environment variables accordingly, see the document on how to setup environment and installation to use Aspose.Cells for Python via Java for your reference. You may also post your queries in the dedicated section.
PS. I am working as Support developer/ Evangelist at Aspose.

Related

How to call python module in Robot framework

I do have the following folder structure for python scripts.
From Python I can run a script in folder Feed2Scripts as follows. Can this be possible in Robot Frame Work through imported libraries? > Note that I have common scripts in ‘GeneralScripts’ used by all other scripts in different folders
../Scripts>python –m Feed2Scripts.Script1 param1
If I just import Feed2Scripts/Script1.py as a library in RF, then It is failing to load libraries defined 'GeneralScripts'
First you set your python path on RIDE's Tools->Preferences->Importing Pythonpath so it does include your library and all its dependencies (imported modules and so on), like this:
(If your library is distributed via PIP, just pip install my_library_package_name instead, on the same environment you are running Robotframework/RIDE)
Then you can add the library to your test suite on the add library dialog you can open by pressing the library button on the Edit tab you can see when you select the suite:
After that, all keywords defined in your library will be available for use in any test of the test suite. You will see a Library import sentence on the Settings section of the header of your suite's code (On your text editor or RIDE's Text Edit tab of the suite:
Sometimes RIDE doesn't recognize the keywords on a recently added or modified library right away. In that case, Save all (CTRL+SHIFT+S) and restart RIDE to fix the issue.
Also, watch out for the library entry showing up in red on the suite import list on RIDE's Edit tab; it means something went wrong when trying to import the library. If you need to know what, you can find the trace on RIDE's Tools->View Ride Log.

What is mean by "Rnobody" in R script installation

I currently working with a Java based jetty server setup which involves servlet and HTML. The objective is to call R script from Java
In one of the custom configuration properties file inside WEB-INF/classes, I have encountered a statement as follows.
RScriptLocation=/usr/local/bin/Rnobody
This property file is not related to jetty server, it is the developer who created this properties file for storing constants.
I have installed R from cygwin setup, but I could not locate that particular executable, I only see /usr/bin/R
what is Rnobody and how to install it

Let atom editor recognize external APIs

I'm trying to set up a python like environment with Atom-editor on a Linux machine.
I find the autocomplete-python package that uses jedi.
In the settings of the package I tried to add some python path where the APIs are (/usr/lib/python2.7/dist-packages/) but then the autocompletion doesn't recognize these libraries (for example the PyQt ones)
Am I missing something?
For anybody having the same issue please look here.
Basically everything should work out of the box, but if it does not -- try to configure path to python executable with which you have installed your external module. If it's still fails to complete -- try to configure extra path to python modules. (usually your site-packages directory)

Where is the Rserve Config file located on Windows?

I'm using a Windows 7 x64 machine with R-3.1.0. I installed the Rserve package through Rstudio.
The start of Rserve is successful with the following code in Rstudio:
library(Rserve)
Rserve()
I got the following output:
Starting Rserve...
"C:\R\R-31~1.0\library\Rserve\libs\x64\Rserve.exe"
My problem is that I couldn't locate the configuration file. Apparently it can't be "/etc/Rserv.conf".
I did come across a webpage saying that the config file is Rserv.cfg in the working directory (unless changed at compile-time). But which working directory? I have checked the working directory of the current R project as well as the Rserve library directory, but it was not there...Could someone help me with this please? Thank you.
Rserve does not automatically come with a config file, you must make one. Best steps for doing so:
Navigate to the file where you just installed Rserve.exe (C:\R\R-31~1.0\library\Rserve\libs\x64\R, based on the message you copied here)
Find Rserve.exe, Reserve_d.exe, and Rserve.dll there. Copy these files.
Navigate to where R.dll is on your computer. This is probably C:\Program Files\R\R-3.1.3\bin\x64, but may be different depending on where you installed R to.
Copy the 3 files mentioned above to this location.
Create a text file here named "Rserv.cfg" with the arguments you are looking for, such as port 6312 or library(mvoutlier). Yes, I know that this is different from the documentation, but if you start Rserve_d.exe you will see that this is the file it is looking for. I have not had success naming it anything else.
You can start Rserve by specifying the location of the config file. In R instead of just Rserve() try the following:
Rserve(args="--RS-conf C:\\folder\\Rserv.cfg")
If path is more complicated you need to massage it a little bit:
Rserve(args="--RS-conf C:\\PROGRA~1\\R\\R-215~1.2\\library\\Rserve\\Rserv.cfg")
Look in the $RHOME/bin directory
If you can't find it here is a different way to approach it:
Download Rserve at [http://rforge.net/snapshot/Rserve_.tar.gz], and save it in your desired directory
Run R CMD INSTALL Rserve_.tar.gz
This allows you to leave Rserve where you want it.
After looking at the Rserve source code and making some test I found that on Windows platform Rserve try to load the configuration file from the current working directory. Also pay attention because on Windows the file name is RServ.cfg and not Rserv.conf as documented.
The current working directory depends of the process, for example using RStudio by default it is your Documents and Settings folder:
C:\Users\[username]\Documents
but can be changed in the "Global Options" of the IDE
So you can create an "RServ.cfg" text file in that directory with your needed options and starting RServe in the usual way in RStudio
Rserve()
will load your configuration.

Compiling haskell module Network on win32/cygwin

I am trying to compile Network.HTTP (http://hackage.haskell.org/package/network) on win32/cygwin. However, it does fail with following message:
Setup.hs: Missing dependency on a foreign library:
* Missing (or bad) header file: HsNet.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Unfortuntely it does not give more clues. The HsNet.h includes sys/uio.h which, actually should not be included, and should be configurered correctly.
Don't use cygwin, instead follow Johan Tibells way
Installing MSYS
Install the latest Haskell Platform. Use the default settings.
Download version 1.0.11 of MSYS. You'll need the following files:
MSYS-1.0.11.exe
msysDTK-1.0.1.exe
msysCORE-1.0.11-bin.tar.gz
The files are all hosted on haskell.org as they're quite hard to find in the official MinGW/MSYS repo.
Run MSYS-1.0.11.exe followed by msysDTK-1.0.1.exe. The former asks you if you want to run a normalization step. You can skip that.
Unpack msysCORE-1.0.11-bin.tar.gz into C:\msys\1.0. Note that you can't do that using an MSYS shell, because you can't overwrite the files in use, so make a copy of C:\msys\1.0, unpack it there, and then rename the copy back to C:\msys\1.0.
Add C:\Program Files\Haskell Platform\VERSION\mingw\bin to your PATH. This is neccesary if you ever want to build packages that use a configure script, like network, as configure scripts need access to a C compiler.
These steps are what Tibell uses to compile the Network package for win and I have used this myself successfully several times on most of the haskell platform releases.
It is possible to build network on win32/cygwin. And the above steps, though useful (by Jonke) may not be necessary.
While doing the configuration step, specify
runghc Setup.hs configure --configure-option="--build=mingw32"
So that the library is configured for mingw32, else you will get link or "undefined references" if you try to link or use network library.
This combined with #Yogesh Sajanikar's answer made it work for me (on win64/cygwin):
Make sure the gcc on your path is NOT the Mingw/Cygwin one, but the
C:\ghc\ghc-6.12.1\mingw\bin\gcc.exe
(Run
export PATH="/cygdrive/.../ghc-7.8.2/mingw/bin:$PATH"
before running cabal install network in the Cygwin shell)

Resources