iGraph Cairo error, unable to import iGraph even though I installed Cairo - igraph

Before I installed Cairo, iGraph was working completely fine. After, the installation, iGraph is no longer working.
The error I get is this:
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so': dlopen(libcairo.so, 2): image not found
cannot load library 'libcairo.2.dylib': dlopen(libcairo.2.dylib, 2): image not found
cannot load library 'libcairo-2.dll': dlopen(libcairo-2.dll, 2): image not found

Related

OSError: libcurand.so.10: cannot open shared object file: No such file or directory

I am working on Nvidia Jetson Tx2 (with JETPACK 4.2) and installed the pytorch following this link.
When I am importing torch in python its giving me an error OSError: libcurand.so.10: cannot open shared object file: No such file or directory I have tried all the options but nothing worked.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.0/lib64
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda-10.0/lib64
export PATH=$PATH:/usr/local/cuda-10.0/lib64
Any guidance to debug the issue is requested. Thanks
emm
I found this answer as followed...
https://forums.developer.nvidia.com/t/mounting-cuda-onto-l4t-docker-image-issues-libcurand-so-10-cannot-open-no-such-file-or-directory/121545
The key is : "You can use JetPack4.4 for CUDA 10.2 and JetPack4.3 for CUDA 10.0."
Maybe downloading Pytorch v1.4.0 and Jetpack 4.2/4.3 would solve this question...
Anyway, it is helped for me... good luck
enter image description here

DBD::mysql error in ActivePerl 5.28 on Windws10 64bits, Can't load mysql.dll

I'm having an issue with the DBD::mysql module. This question has been asked before on this forum but a solution was not posted so I thought I would repost it. Sorry if this is not appropriate for this forum. This is my first post.
You can find the original post from bLIGU here:
Error using perl module DBD::mysql in ActivePerl 5.28 on Windws10 64bits
I have the exact same problem. I'm just upgrading my Active Perl version. Nothing else changed. I'm running the same MySql server version and this script ran fine before the update and it runs fine if I go back to version 5.20.2.2002 and use PPM to download the packages.
Note that ActiveState now requires you to build a custom version of ActivePerl with the modules online and generates an install file for you. PPM is no longer supported.
Here's the error:
install_driver(mysql) failed: Can't load 'C:/Perl64/site/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at C:/Perl64/lib/DynaLoader.pm line 193.
at (eval 11) line 3.
Compilation failed in require at (eval 11) line 3.
Perhaps a required shared library or dll isn't installed where expected
at C:\E22_TE~1\ICTDEV~1\Scripts\UPDATE~1.PL line 136.strong text
The file C:/Perl64/site/lib/auto/DBD/mysql/mysql.dll is present so I'm wondering if the DLL is trying to load something else and returns an error.

Python3 html to pdf

how to convert HTML to PDF in Python3?
Xhtml2pdf does not work in Python3, got error:
import xhtml2pdf.pisa as pisa
Traceback (most recent call last):
File "", line 1, in
File "/home/hound/test/python/test_env/lib/python3.4/site-packages/xhtml2pdf/init.py", line 41, in
from xhtml2pdf.util import REPORTLAB22
File "/home/hound/test/python/test_env/lib/python3.4/site-packages/xhtml2pdf/util.py", line 302
raise Exception, "box not defined right way"
^
SyntaxError: invalid syntax
The best that I found by far is weasyprint.
From the documentation:
from weasyprint import HTML
HTML('http://weasyprint.org/').write_pdf('/tmp/weasyprint-website.pdf')
and it really works that easy. Saved me tons of time (after I wasted time trying to get xhtml2pdf and others to work in python 3 but failed.
I had the same error. Apparently for now xhtml2pdf has Python3 support only in its prerelease version - 0.2b1 (for more info see https://pypi.python.org/pypi/xhtml2pdf). I’ve solved the problem by uninstalling the previous xhtml2pdf version and installing the prerelease version
pip install --pre xhtml2pdf

Creating JDBC driver in R using RJDBC

I am trying to create a JDBC driver in R using following code:
i have already set the directory to location where .jar folder is located
drv <- JDBC("com.mysql.jdbc.Driver",
"mysql-connector-java-3.1.14-bin-g.jar",
identifier.quote="`")
i get the following error:
Error in .jfindClass(as.character(driverClass)[1]) : class not found
what would be the problem?
the following works for me i.e. i do not get "class not found" error. I downloaded mysql-connector-java-5.1.38-bin.jar into my current working directory and ran the below without issues
library(RJDBC)
drv <- JDBC(driverClass="com.mysql.jdbc.Driver",
classPath="mysql-connector-java-5.1.38-bin.jar",
identifier.quote="`")
I had a problem loading the script drv <- JDBC("com.mysql.jdbc.Driver","PATH_to_jar", ...) in R, although the PATH was correct. There was a Java update in my Linux distro which caused the package rJava or RJDBC not to work anymore. Unfortunately, the error message was that class com.mysql.jdbc.Util could not be found when executing the subsequent dbConnect(drv, ...) after this update. This was a bit strange and took me a while to figure out that the package was broken, because it loaded correctly using library(RJDBC).
My solution was to reinstall rJava and RJDBC to make it work again (packages.install("rJava") packages.install("RJDBC")). I recognized it was a Linux problem since the code worked fine in RStudio on Windows.

How to add javax.swing.SwingUtilities dependency to SBT?

I'm starting to develop a Scala application with Swing using SBT. I figured out that I need two dependencies for a start, so that's scala-swing and javax.swing.SwingUtilities.
I've been searching the web, maven repositories and github, but stil couldn't find, where did the javax.swing package go.
So far I have found javax in Maven Repos, but javax.swing is not listed there for some reason.
I tried to add a javax dependency to my Build.scala:
val javax = "javax" % "javaee-api" % "7.0"
SBT downloaded several packages. Then I launched the terminal:
scala> import javax.swing.SwingUtilities
import javax.swing.SwingUtilities
scala> SwingUtilities.invokeLater()
<console>:9: error: not enough arguments for method invokeLater: (x$1: Runnable)Unit.
Unspecified value parameter x$1.
SwingUtilities.invokeLater()
^
That's scala console being launched from sbt project. So as you can see, import was successful and the console knows about invokeLater() method. But IntelliJ Idea still does not, it marks javax.swing as unresolvable, though it has downloaded the packages.
I'm completely stuck here.
javax.swing is part of any standard Java SE installation (see http://docs.oracle.com/javase/6/docs/api/ - there you have SwingUtilities), so there is no need to add a dependency. You only need the scala-swing dependency:
libraryDependencies += "org.scala-lang" % "scala-swing" % scalaVersion.value
If IntelliJ IDEA doesn't see javax.swing, you have probably not yet defined an "SDK". Go to File -> Project Structure -> Platform Settings -> SDKs. There you should have at least one entry such as "1.6" for Java 1.6 or "1.7" for Java 1.7. If not, press the "+" to add one and locate the appropriate Java home directory for the version you want to use (depends on your OS).