Not able to install the RYU controller - ryu

I have tried to install the RYU controller .
I am using the below commands “sudo python setup.py install “ its error out with below message
That ryu.hooks not available and when I run the command “python setup.py install” it gives the error that setuptools not available .
Please give the response as soon as possible we are in the middle of installing the controller .
-Ajay

Are you installing the controller in a Linux-based VM? If so, then SDN Hub (http://sdnhub.org/resources/) offers a vm with Ryu already installed. You may consider downloading and using it. Depending on your familiarity with Ryu, you may also want to use the Ryuretic framework for implementing your project. The linked lab provides instructions for getting it up and running.

Related

Something went wrong installing the "sharp" module, on Mac M1

I had been trying to resolve this issue and had tried running the app via rosetta terminal, but same issue persists. I tried installing the sharp package globally but that to did not help.
Here is a snippet of the error :-
I think the issue is something related to Sharp package specific for the arm architecture
I was trying to setup a repo on my system locally and simply ran yarn dev. I expected the server to start but the same error keeps coming again and again .
I think your problem is related to this conversation: https://github.com/lovell/sharp/pull/3514
Specifically "On an M1/M2 based machine, the dylib files provided by a globally-installed vips (via Homebrew or otherwise) will be ARM64, therefore we cannot use these when running Node.js under x64 emulation as there will be a runtime conflict."

Installing Anaconda on Linux VM Instance on Google Cloud Platform

I have provisioned a VM (ubuntu-minimal-1804) on google cloud platform. I want to install anaconda3 and run jupyter notebooks on it. I lack the Computer Science/ IT background and hence tried to follow the online resources. I am finding it difficult install the anaconda3 and jupyter on the VM despite following these sources. Can anyone help me with this? I would really appreciate if anyone can provide me with step-by-step guide.
Note: These are the links that I followed but failed to install anaconda
https://www.cloudbooklet.com/how-to-install-anaconda-on-ubuntu-18-04-lts-google-cloud/
https://www.datacamp.com/community/tutorials/google-cloud-data-science
Thank you in advance
The steps that you have followed should be applicable to your Ubuntu 18.04 LTS VM (with the official image and default setup), after locating it in your instances list and clicking on the SSH button.
Despite the "minimal" images lacking some of the commonly-used utilities in Ubuntu, I could test the commands in the guide in a new VM from the ubuntu-minimal-1804-lts image family and managed to successfully install Anaconda3, except for the VSCode installation that seemed to have an outdated server connection check.
I would also recommend trying the latest installer for Anaconda3 that's available in the repo archive instead, as the one in the guide is a bit outdated:
$ curl -O https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
$ rm -rf ~/anaconda3 # (clear previous attempted installation first, if any)
$ bash Anaconda3-2020.11-Linux-x86_64.sh
In any case, as suggested by John Hanley, feel free to comment below or edit your question with any errors that you might get.

"Import Error lxml" is shown in AWS Lambda

I am trying to run using pygal libray to show graph in AWS lambda.But this error is shown, even I have already installed lxml.deployment_package
my_source_code
import_error
It's because lxml contains binary pre-compiled libraries that it uses. When you install lxml locally on your Windows machine, you install a Windows-compatible version of it. However this is not compatible with the Lambda execution environment which is Linux based.
So you have to create a Lambda compatible deployment package. You have couple of options doing so. You can use sam build --use-container, you can build the libraries in a Docker environment and then zip those, etc. See this answer as well.

Downloading and installing PyBluez for a 64-bit Windows 10 PC?

I'm trying to use bluetooth with python, and I came across a module - pybluez. Right then, I tried installing it by running pip install pybluez. The package was located and downloaded, but it raised an error when running python setup.py egg_info.
I then tried to download pyBluez from this link https://pypi.python.org/pypi/PyBluez
But, it said that the Python version installed on my PC is not 2.7 ( I have 2.7.10; do I need 2.7.0 for this?) Also, this download link is for a 32-bit system, and that might be the reason it does not run on mine.
So I ask:
1. How do I fix this error?
Error in the output when I try to install pybluez using pip:
2.Does download using https://pypi.python.org/pypi/PyBluez need python 2.7.0, and a 32-bit system? If so, can someone suggest a better way for a 64-bit system?
3.Any other bluetooth module that could work as a substitute?
I have successfully built pybluez for win10x64 with python3.6
Download and install windows 10 build tools: https://www.visualstudio.com/pl/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
Run 'Developer Command Prompt for VS' as administrator
Clone pybluez repo https://github.com/karulis/pybluez
cd to directory with repo
run python setup.py install
Happy bluetoothing
This is an "expanded solution" which supplements the other answers posted.
Bluetooth is readily supported on Linux in basically any context. Python 3 built-in socket objects work over bluetooth even. But for Windows, there are hoops to jump through. The standard solution for this is to use PyBluez. If you're really lucky, you might be able to install with just pip install PyBluez-win10. If that fails, however, the way to go is an installation via a pre-compiled "wheel".
A given wheel only works for your specific context, however, i.e. exact Python version. So, for the sake of future proofing, if you are going to need PyBluez, you should know how create a wheel from the source for yourself. It's a long, annoying process if you don't have the all the software required already and are not familiar with some parts of the process e.g. using Anaconda. So, if you are working in a team, I suggest having one person burn their time on this and then share the wheel with everyone (who are hopefully on the same version of Python!).
The following is a paraphrased version of what is posted here: https://github.com/pybluez/pybluez/issues/180 which includes the actual developer's comments and methodology.
Download and run the "Visual Studio Build Tools" installer:
For an official list of exact compilers and links to match against target Python versions, refer to: https://wiki.python.org/moin/WindowsCompilers
Here's the 2019 Build Tools link, which works with Py3.7:
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019
During the install you MUST select BOTH "Visual C++ build tools" AND "Universal Windows Platform build tools". Leave the default options alone within those (e.g. including the Windows 10 SDK).
Note: this requires 15GB of disk space, and some patience!
Install "Miniconda":
https://docs.conda.io/en/latest/miniconda.html
Select the one which matches the bit set (32 vs 64) of the destination Python version
you wish to install PyBluez into.
Clone the PyBluez source repo to a temp location (e.g. your desktop). Then, launch the terminal and change into that directory:
git clone https://github.com/pybluez/pybluez
cd pybluez
If you did NOT put conda on the system path (as the installer recommends NOT doing so), you can add it for this local CMD session per this example command:
set CONDA_DIR=%USERPROFILE%\Miniconda3
set PATH=%CONDA_DIR%\condabin;%PATH%
Create a dedicated environment to build pybluez with the desired Python version. Then, launch that. The example below uses Python 3.7 but the same steps will also work for other versions (including Py 2.x etc)
conda create -y -n pybluez python==3.7
activate pybluez
Build a wheel file. Then, leave the dedicated environment.
python setup.py install
python setup.py bdist_wheel
deactivate
Copy the wheel to your desktop. From there, you can do with it as you wish. Then, delete the pybluez conda environment and the source repo, (as you no longer need either of them).
copy .\dist\*.whl "%USERPROFILE%\Desktop"
cd..
rd /s /q "%CONDA_DIR%\envs\pybluez"
rd /s /q pybluez
Finally, you can install the wheel to a target Python instance and/or store/share it:
The name of these files and the path will vary, so define those first for your use case
set PYBLUEZ_WHEEL=%USERPROFILE%\Desktop\PyBluez-0.22-cp37-cp37m-win_amd64.whl
set PYTHON_PATH=python
Install the wheel:
%PYTHON_PATH% -m pip install "%PYBLUEZ_WHEEL%"
Confirm installation:
%PYTHON_PATH% -c "import bluetooth; print(bluetooth.__version__)"
I downloaded a Python 3.6 wheel from here (wheels for python 2.7, 3.5, 3.6, 3.7 available too).
I installed it in my virtual environment via
pip install PyBluez-0.22-cp36-cp36m-win_amd64.whl
One command solution.
pip install git+https://github.com/pybluez/pybluez.git#egg=pybluez

Hyperledger Fabric 1.0 Ubuntu 16.04 Setup issue

Following 2 links to setup Hyperledger Fabric 1.0 in system.
First link Hyperledger-fabric setup
After following commands
cd $GOPATH/src/github.com/hyperledger/fabric/devenv
vagrant up
vagrant ssh
Followed hypeledger latest setup docs
After using
cd $GOPATH/src/github.com/hyperledger/fabric
make dist-clean all
An error occured...
github.com/hyperledger/fabric/vendor/github.com/mattn/go-sqlite3 /usr/bin/ld: cannot find -lrocksdb collect2: error: ld returned 1 exit
status Makefile:137: recipe for target 'build/bin/peer' failed make:
*** [build/bin/peer] Error 2
On Left side my vagrant is running and right side is my Hyperledger Fabric 1.0 Setup command make dist-clean all
To me this seems to be problem of rocksdb, how can I resolve this?
Hyperledger Fabric 1.0 can be installed without having to build from source. The project publishes stable Docker images and binaries for each release. This may be a better approach to installing Fabric and its dependencies.
However, if you want to build from source, note that Vagrant is no longer needed. The build should be capable of running natively on most platforms (Mac, Windows and Ubuntu).
You will need the same prerequisites as for the Getting Started approach above - Docker (preferably the latest release), Go (1.9.x), Python 2.7 and Node 6.9.x (note that we do not yet support Node 7.x).
Occasionally, it has been observed that a fresh build (make all) from scratch may occasionally fail. If so, try running (make all) again.
As for the rocksdb error, Fabric no longer has a dependency on rocksdb and uses leveldb instead. It is entirely likely that because the vagrant environment gets little use of late, that it is not current.
I fond solution in one git hub link.
One can try to resolve this issue by using following commands-
apt-get install librocksdb-dev
apt-get install libsnappy-dev
apt-get install libbz2-dev
After this rockdb error should not be there. Will post more if found any other error and there solutions too.

Resources