I have to compile a Julia script and use opencv-python in it.
If it is feasible, how to compile?
What should I use? >PackageCompiler?
This may be possible with PackageCompiler.jl. You will likely need to set up some artifacts as detailed here: https://julialang.github.io/PackageCompiler.jl/dev/apps/#Artifacts-1
You can find out more about the Julia Artifacts system here: https://julialang.github.io/Pkg.jl/v1/artifacts/
It may also be worth opening an issue and asking on the PackageCompiler.jl repo if there has been any work or tests with combining Julia and Python via PackageCompiler so as to avoid going down a dead end.
Related
Like python -d (debug/verbose) spews lots of information at interpreter startup, how can I achieve something similar with Julia? (My specific problem is to find out why, when called from python (pyjulia), Julia 0.6dev can't load boot.jl).
There is no verbose startup mode. You can, however, run julia and/or the python process loading libjulia under gdb. Just spitballing, not being able to find boot.jl sounds like a path problem. I'm also somewhat surprised that libjulia would be trying to find or load boot.jl in the first place, since that file and many others are usually baked into a system image file with a .ji extension (sys.ji previously and inference.ji more recently).
You just installed a meteor package, and for some reason it isn't working. You suspect that it's the package itself that has a bug. You want to investigate that. How do you do that?
Optimally, you'd be able to run a command that forks the original package repository with the right version and replaces the original in your meteor application, ready for you to debug it and, once fixed, possibly generate a pull request.
I don't expect something like this to exist as a single command, but is there a workflow that you follow to do exactly that? Or do you approach the problem in a different way?
Do a git clone of the package into your local packages folder. Fix any bugs you need to. Commit them. And make a pull request. Once the pull request is accepted, you can remove the local package and use the regular package.
From when I've asked in the past, there isn't really an easier way to do this it seems. But to be honest, this approach isn't too much work.
Also, if you just want to debug, you can step through the package code while it's running without cloning the repo locally. (Assuming it's running in development mode and hasn't been minified by Meteor).
Is it possible to reinstall or recompile an already installed package in Julia? I did not find any hints in the official documentation. whos() did not reveal anything useful either.
Best
As was pointed out in the answer below by #ivarne my question can also be understood as:
"How can I reload a package that has been loaded with import or using in a Julia session?"
This question has also been answered by #ivarne.
You can re-run the package build script with Pkg.build("pkgname"). The actual compiling of the packages is just in time so they are complied when you load them.
Not sure about the terminology you use, but if you think about reloading a package (with import or using), it is complicated and the best approach is to restart Julia.
A function called reload() exists, but it has some limitations. While developing a Package, you might consider using something like the Autoreload.jl package to make it easier to reload the files you are working on.
If you are developing package and heve it installed using dev command, than Base.compilecache(Base.PkgId(PDFIO)) does the job.
In this case PDFIO is the package that I'm working on.
It is more convenient than restarting julia.
I've got a (what I assume to be) rather simple question regarding the installation of cvxopt on Windows. I'm following this "guide" http://cvxopt.org/install/index.html. But I've got stuck on the part where you're supposed to
Copy libblas.a and liblapack.a to the src directory.
I think it's fair to say to I'm very lousy at these kind of things and that I've got no idea of what I'm doing. So I would be greatly helpful if someone could tell me where I could find these. I guess it has something to do with:
make lapacklib && cp liblapack.a ..
and
make && cp blas_WIN.a ../libblas.a
But I can't really make anything of this...
Thanks in advance!
cvxopt is included in WinPython. Even if you won't use WinPython directly, it's probably the easiest way to get cvxopt on Windows: After installing WinPython, you can copy the cvxoptfolder from the Lib\site-packagesdirectory into the corresponding one of your Python distribution.
Edit:
It's again available under the unofficial windows binaries.
Unfortunately the cvxopt 1.1.7 currently distributed with the unofficial windows binaries has issues with the current winpython 2.7.6.4 (or maybe has issues on its own). In my experience you could encounter many weird problems like code throwing math domain errors or arithmetic errors where things used to work perfectly fine on winpython 2.7.6.2 and the cvxopt 1.1.6 included there. I do not think that it is a problem with cvxopt 1.1.7 since it works fine on linux, rather of the specific binary packaging or maybe incompatibility of such packaging with the latest winpython.
If you are encountering such issues, maybe you can stay with winpython 2.7.6.2 that is the last version shipping a working cvxopt.
I've developed a .R script that works with a DB, does a bunch of processing and outputs graphs and tables. I can output that data as comma-separated values and pictures, to later import them on my software, that I have no issue.
The problem is how can I distribute my application without having to make a complete install of R on the client. I've seen things like RJava, but my app is on VB6 (yeah...) and I don't see any libraries, or ways to compile to exe. The compile package only makes compiled versions of any function you define, like what psyco used to do for Python (before Pypy).
Does anyone have some insight on compiling R to avoid having the user to install an entire additional software?
EDIT: Does an R compiler exist? This question relates deeply to mine, but I haven't seen how it can be used to make a full script an exe. You can just compile a main function and cat it to a file? Is that even possible?
The short answer is "no, that will not work".
There simply is no compiler that allows you to shrink-wrap your app. So your best best may be either
using the headless Rserve over the network, or
using the R (D)COM server used by RExcel et al