when compiling a code in Arduino Idea get this error:
Traceback (most recent call last):
File "/home/user/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py", line 37, in
import serial
ImportError: No module named serial
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.
you should install serial package.
use this code:
# For debian base linux
sudo apt-get install python-serial
# For Centos
sudo yum install python3-serial
# For Fedora
sudo dnf install python3-serial
sudo apt-get install python-serial
This worked for me. I am using a Linux Machine.
Related
How to install Sqlite3 in Raspberry Pi.
I tried to do it with :
sudo apt-get install sqlite3
but getting following error :
Could not resolve 'mirrordirector.resbian.org'
unable to fetch some archive, may be run apt-get update or try with --fix-missing?
Here is a list of the steps that I did in order to attempt to install Octave 4.2.1 in Centos 7 (repo version is 3.8.2 which is really old now)
1) yum update
2) yum-builddep -y octave
3) yum -y install qt-devel mercurial gcc-c++ lapack-devel libtool
4) yum -y install epstool transfig pstoedit qscintilla-devel
(NOTE: First problem was right here as there is NO pstoedit in Centos 7, as far as I know)
5) sudo yum install bzip2-devel atlas-devel libsndfile-devel portaudio-devel GraphicsMagick-c++-devel
6) ln -s /usr/lib64/atlas/libtatlas.so /usr/lib64/libatlas.so (One of the tutorials recommended doing this to fix a place where a library was being searched for or something like that. It seemed harmless enough)
7) wget ftp://ftp.gnu.org/gnu/octave/octave-4.2.1.tar.gz
8) tar-xvf octave-4.2.1.tar.lz
9) cd octave-4.2.1
10) export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
11) ./configure --prefix=/usr/local/octave/versions/4.2.1
12) make -j4
It failed with this error:
In file included from libgui/src/settings-dialog.cc:31:0:
libgui/src/ui-settings-dialog.h:13:29: fatal error: QtWidgets/QAction: No such file or directory
#include <QtWidgets/QAction>
Has anyone come up with this problem and has some workaround or solution? Thanks
QtWidgets/QAction is specific to Qt5, and it seems that when you executed yum-builddep -y octave it got dependencies for Qt4. Configure octave with the option --with-qt=4. Another option is to install qt5 libraries and its devel files, configure --with-qt=5, and make.
Or you can just use Flatpack to install the latest version of Octave without any hassle:
flatpak install flathub org.octave.Octave
flatpak run org.octave.Octave
CentOS 7 already comes with built-in Flatpack app, but your distro doesn't have one you can install it:
sudo yum install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Official website:
https://flatpak.org/setup/
I try to follow the guide bellow to install .net core on my raspberry pi 3:
https://www.microsoft.com/net/core#debian
The script told me to install below:
dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue
dotnet_install: Error: Unable to locate gettext. Install gettext to continue
i install them using apt-get install, and everything fine:
sudo apt-get install libunwind-dev
sudo apt-get install gettext
but no luck, when i run below :
sudo curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet
i got:
dotnet_install: Error: Download failed
Are there any missing?
Please use last valid URL:
curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview1/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet
And it downloads and installs successfully on latest Raspbian on Raspberry Pi 2 (I think there should be no problem with Raspberry Pi 3).
However, after successful install, there is a error:
bash: dotnet: cannot execute binary file: Exec format error
I believe this is because of ARM architecture, because currently only amd64 (x64) is supported.
I am having a really hard time getting OpenCL working in Trusty or Mint 17. Im using ppa:xorg-edgers, tried updates and even nvidia-340.
sudo apt-get install nvidia-331 nvidia-331-uvm nvidia-cuda-toolkit nvidia-cuda-dev opencl-headers nvidia-opencl-dev clinfo
Rebooting and then
babak#ASUS-G750JH:~$ clinfo
clinfo: /usr/lib/x86_64-linux-gnu/libOpenCL.so.1: no version information available (required by clinfo)
I: ICD loader reports no usable platforms
I have tried this on two Intel based systems with Nvidia GPU's a desktop with a GeForce 280, and a laptop with GeForce 780M with a physically disabled Optimus by the Asus, it only has the Nvidia GPU. A G750JH.
Has anyone done this successfully? Can I roll back and remove the PPA and use the default repo's, would that even make a difference?
For the xorg-edgers nvidia-346 packages, I get it working by installing also the nvidia-opencl-icd-346 package and its dependency ocl-icd-libopencl1.
Im not 100% sure what the issue was, but seems that the ppa:xorg-edgers, may have an issue. Whatever is broken the process below fixes the issue and results in both Cuda and OpenCL working with Nvidia and Ubuntu 14.04 x64
sudo apt-get install dkms linux-headers-generic fakeroot build-essential
sudo apt-get remove --purge nvidia-*
sudo apt-get purge nvidia*
sudo ./NVIDIA-Linux-x86_64-346.47.run
Downloaded from Nvidia, 340.xx supports legacy cards
Yes for all options
sudo reboot chmod +x cuda-repo-ubuntu1404_6.5-14_amd64.deb
dpkg -i cuda-repo-ubuntu1404_6.5-14_amd64.deb
chmod +x cuda_6.5.14_linux_64.run sudo ./cuda_6.5.14_linux_64.run
Choose option to leave out the GPU Driver
sudo apt-get update
sudo apt-get install cuda
add to bottom of bashrc
export CUDA_HOME=/usr/local/cuda-6.5
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
export GLPATH=/usr/lib/
PATH=${CUDA_HOME}/bin:${PATH}
export PATH
sudo reboot
./ocore_601_OpenCL_v20 --devices
Downloaded from http://stanford.edu/~yutongz/ocores/
Outputs:
OpenCL compatible devices:
name: GeForce GTX 780M | platformId: 0 deviceId: 0
cd ~/NVIDIA_CUDA-6.5_Samples/1_Utilities/deviceQuery
make
./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GTX 780M"
......
Truncated
I have installed Eclipse 3.7.2 via PPA on Ubuntu 12.04 and subsequently I have clicked on Add New Software and the link to 64Bit Aptana studio 3.
It found the plugin and installed it correctly.
Now when I startup the Eclipse I get this error:
An internal error has occurred.
No more handlesNative code library failed to load. (java.lang.UnsatisfiedLinkError: /home/xxx/.eclipse/org.eclipse.platform_3.7.0_155965261/plugins/com.aptana.swt.webkitbrowser.linux.x86_64_1.0.0.1295409059/os/linux/x86_64/libcefjni.so: libjpeg.so.62: cannot open shared object file: No such file or directory)
UPDATE:
I wonder could it be because I am using jdk 7 from Oracle rather than Sun jdk 6 ?
This is the log file of Eclipse
!SESSION 2012-04-30 07:48:06.985 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_04
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2012-04-30 07:48:07.951
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gtk.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
I have found the solution:
The library libjpeg62 is required otherwise the java.lang.UnsatisfiedLinkError shows up.
If using OpenJDK try this:
sudo apt-get install openjdk-7-jdk libjpeg62 libwebkitgtk-1.0-0 git-core
if using Oracle (sun) Java try this:
sudo apt-get install libjpeg62 libwebkitgtk-1.0-0 git-core
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
source
Here is a complete guide on how to install Aptana Studio 3 on Ubuntu 12.04 LTS (Precise Pangolin). The same error you encountered is mentioned with the same solution. But might be helpful for people who want to do the full installation.
http://www.samclarke.com/2012/04/how-to-install-aptana-studio-3-on-ubuntu-12-04-lts-precise-pangolin/