VCPKG_FORCE_SYSTEM_BINARIES Errors when Running vcpkg on raspberry pi - raspberry-pi

I installed the latest version of cmake and was following some instructions i made to integrate a project that used vcpkg with grpc. After installing vcpkg I try to install package with ./vcpkg install grpc which resulted in the error bellow. The instructions worked on a OSX and Ubuntu but I run into issues with raspberry pi.
I have set tried both 0 and 1 like so $VCPKG_FORCE_SYSTEM_BINARIES=1 but neither option is working. Using ./vcpkg result in a VCPKG_FORCE_SYSTEM_BINARIES error:
pi#raspberrypi:~/vcpkg $ ./vcpkg
Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.
pi#raspberrypi:~/vcpkg $ VCPKG_FORCE_SYSTEM_BINARIES=1
pi#raspberrypi:~/vcpkg $ echo $VCPKG_FORCE_SYSTEM_BINARIES
1
pi#raspberrypi:~/vcpkg $ ./vcpkg
Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.

In bash the environment variable is set with export:
export VCPKG_FORCE_SYSTEM_BINARIES=1
./vcpkg install grpc
The export command can be put in .bashrc to persist this setting.
src: https://github.com/microsoft/vcpkg/issues/14140

Related

python2.7 in Raspbian Lite

I have installed Raspbian Lite OS in Raspberry Pi zero.
I found that Raspbian Lite comes with Python3 as default.
But I am gonna run some scripts that uses libraries that are Python2 Compatible.
So I tried to change the default Python version from Python3 to Python2 (Specifically Python2.7.18)
After so much searching and trying, instructions from [this page][1] made my job
Now if I try to check in command writing
python --version
It shows me that it is Python2.7.18
But the problem is I am not being able to install any packages using
sudo apt-get install <python-packagename>
It shows me Errors like
1.Package "python-pip" has no installation candidate (When I tried to install pip)
2. Package python-numpy has no installation candidate (when I tried to install numpy)
3. unable to locate package python-pyaudio (when I tried to install pyaudio)
I am searching but no solution.
Can anyone please help? I am frozen in a critical stage of my project .
Generally, for new raspbian/raspios os with python 3 by default, it is not suggested to replace the system python interpreter to python 2, it may break some system component's dependency.
Instead, you can create a python 2 virtual env, if you need to run python2 scripts.
sudo apt-get install python3-pip
pip install virtualenv
virtualenv -p /usr/bin/python2.7 venv
source venv/bin/activate
You can test the python version as following,
(venv) $ python --version

VS Code Jest fails starting on Ubuntu 20.04 (ubuntu-make install)

Environment
Ubuntu 20.04 (official Beta Version)
Visual Studio Code 1.44.2, installed via ubuntu-make (umake):
umake ide visual-studio-code
Node 12 via nvm install 12 && nvm alias default 12 && nvm use default
VS Code Extension: jest
Error
Restarting VS Code fails with:
Finished running all tests. Starting watch mode.
/bin/sh: 1: npm: not found
/bin/sh: 1: npm: not found
Starting Jest in Watch mode failed too many times and has been stopped.
see troubleshooting: https://github.com/jest-community/vscode-jest/blob/master/README.md#troubleshooting
I want to use nvm and want to avoid workaround like adjusting bashrc or similar.
Did not work:
Add to VS Code settings.json (via Ctrl+Shift+P, "Open Settings Json"):
entry "terminal.integrated.shell.linux": "/bin/bash"
Just had an issue running commands over ssh where the node binary from nvm would not be added to the non-login shell's path so couldn't be used. Can't figure out how to add it there and keep it relative to the installed user to be honest.
Removing nvm and installing apt install nodejs through the default repositories is quick workaround if you need.

How to install TensorFlow on Python 3.7

How to install TensorFlow on Python 3.7
Trying:
D:\Users\Downloads>pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
Windows 10 OS
And with vent error, too
(venv) C:\Users\KvaksManYT>pip install --upgrade tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
I would recommend using a virtual environment using pip install vitualenv. Then, depending on your OS, you want to create and activate an environment.
python3 -m venv /path/to/new/virtual/environment
Then, activate this environment using,
source ./venv/bin/activate
Now, you can install any Python packages you want.
pip install tensorflow==2.0.0
you can install Tensorflow follow those steps
Ubuntu/Linux /mac os /windows
virtualenv does not require a mention pip version
for system install, you need to mention pip version
upgrade pip version
pip install --upgrade pip
#virtualenv install
pip install --upgrade tensorflow
#system install
pip3 install --user --upgrade tensorflow
reference https://www.tensorflow.org/install/pip
I had the same problem with Windows 10 x64, and it was caused because I was using the wrong Python version, both globally and in the venv. I found questions on the issue multiple times on the internet, including yours.
Be sure to use Python versions 3.5-3.8, as per requirements, but also x64, not x32.
Namely, I ran into this error using both
a venv with 3.9.1 x64 (python --version),
and my globally installed 3.8.2 x32 (python3 --version).
So, I downloaded the x64-version of Python 3.8.6 from here.
Note that the command venv does not allow specifying the python version used in the virtual environment,
as per an answer on this question. So I used virtualenv, which I obviously had to install in my global Python version first.
To specify the Python version used in the venv, I used the command virtualenv, as in:
virtualenv --python="C:\Users\me\AppData\Local\Programs\Python\Python38\python.exe myvenv
where you have to give the path to the newly downloaded Python distribution you want to use, if there are several on your PC (for example, I had Python38-32 and Python39 folders in that directory).
Check Python versions in virtual environment
After I activate my myvenv, created as above, I verify the Python versions as follows:
python3 --version
> Python 3.8.2
python --version
> Python 3.8.6
Then, using the command
import struct
print(struct.calcsize("P") * 8)
Within either python3 or python, shows me whether the version is 32bit or 64bit, as per this answer. The python returns a 64, so that is the one you want to use (not python3).
Finally, within the virtual environment, you can run
pip install --upgrade tensorflow
and it will download and install. (Meanwhile, pip3 install --upgrade tensorflow would still return your error inside and outside the virtual enviroment.)

Matlab to volttron integration

Below the steps followed to integrate a fake building - fake modbus device (Ubuntu 18.04 LTS) with matlab-based interface.
Following the documentation steps at: https://volttron.readthedocs.io/en/6.0/devguides/walkthroughs/DrivenMatlabAgent-Walkthrough.html
Installation steps for system running Matlab:
Install python (my Python version: 2.7.12)
Steps for system running Matlab:
Install python – done
Install pyzmq –done
Install Matlab-- done (R2019b)
run pyversion --done
version: '2.7'
executable: '/home/USER_NAME/volttron/env/bin/python'
library: 'libpython2.7.so.1.0'
home: '/home/USER_NAME/volttron/env'
isloaded: 0
when I run py.zmq.pyzmq_version() I get
ans =
Python str with no properties.
15.4.0
I copied the example.m to the desktop.
Run and test Matlab VOLTTRON Integration:
To run and test the integration: Assumptions
Device driver agent is already developed (master_driveragent-3.1.1- is installed)
Installation:
Install VOLTTRON –done
Add subtree volttron-applications under volttron/applications by using the following command –
For adding subtree: I used the code: git subtree add --prefix applications https://github.com/VOLTTRON/volttron- applications.git develop --squash error (Working tree has modifications. Cannot add.)
Configuration
Copy example configuration file applications/pnnl/DrivenMatlabAgent/config_waterheater to volttron/config. done
error while installing Drivenmatlabagent in applications/pnnl/DrivenMatlabAgent
(volttron)whygrene#ip-172-31-8-77:~/volttron$ python scripts/install-agent.py -s ./applications/pnnl/DrivenMatlabAgent/setup.py --start
ERROR:install-agent.py:Invalid agent source directory specified.
and running example.m file in matlab server ?
Am i missing something

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.