New to MQTT and Linux world.
I am following this link to set up my Mqtt broker on Raspberry Pi 4.
after running this command
# import PackageCloud signing key
wget -O - "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey" | sudo apt-key add -
and followed its instruction, I ran this:
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.python.sh | bash
All my pip install are failing.
for example:
$ pip3 install PyMail
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/rabbitmq/rabbitmq-server/pypi/simple
Collecting PyMail
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://packagecloud.io/rabbitmq/rabbitmq-server/pypi/simple/pymail/
How can I fix it?
follow this link, complete and working commands for rmq setup:
And you can use pika for connecting ur rmq via python
https://computingforgeeks.com/how-to-install-latest-erlang-on-ubuntu-18-04-lts/
https://computingforgeeks.com/how-to-install-latest-rabbitmq-server-on-ubuntu-18-04-lts/
I have tried to remove my pip3 and re-install it.
Surprisingly, even after removal and re-installation, the error is still there~!!!
This is how I solved this problem:
I opened the pip configuration file which is located:(depending on different OS, the file could locate at different place. Mine is Raspbian Buster 10)
$HOME/.pip/pip.conf
In its content I saw this:
[global]
extra-index-url=https://packagecloud.io/rabbitmq/rabbitmq-server/pypi/simple
then I removed the packagecloud url and restarted my terminal.
problem solved.
I think some scripts in this file:
https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.python.sh
modified the pip config
Related
I'm trying to install the Cronitor CLI on a Raspberry Pi running Raspbian. I've followed the steps from here, swapping amd64 for arm and taking /local/ out of the third command to match to where I put it with the second command. The specific commands I used were:
curl -sOL https://cronitor.io/dl/linux_arm.tar.gz
sudo tar xvf linux_arm.tar.gz -C /usr/bin/
sudo /usr/bin/cronitor configure --api-key [my api key]
When I run "cronitor discover" after installing I get the following usage message:
usage: cronitor [-h] [--apiKey APIKEY] [--id ID] [--code CODE] [--msg MSG]
(--run | --complete | --fail | --ok | --pause PAUSE)
I haven't been able to find anywhere online where this usage is specified, and I'm not sure why this is different from what the documentation says. I do have the Cronitor python3 package installed using "sudo pip3 install cronitor", but my understanding is that it should not interfere, right? Any help would be appreciated.
To resolve the issue I have uninstalled both the CLI and the Python package and tried to reinstall the CLI without the Python package installed. It gives me the same results.
EDIT: For anyone stumbling across this same error in the future, "sudo cronitor" works as intended! Use sudo to access the CLI!
I am trying to use the Python SDK for the IoT Hub by running the example code: "SimulatedDevice.py" but the code breaks on the same exception on 3 different raspbian devices as well as my PyCharm environment.
In trying to run the SimulatedDevice.py example on my Raspberry Pi, the code always breaks with an:
"ImportError: libboost_python-py27.so.1.62.0: cannot open shared object file: No such file or directory"
initial error: "import iothub_client"
I have pip installed the azure-iothub-device-client as well as confirmed the version is python2.7 even trying to reinstall python. This is curious as when I run the exact same file on my Windows CMD the SimulatedDevice.py example code functions fine, it's only in the Python terminal and on the Raspberry Pi do I get this error.
As said in this great post
1st solution
are you running raspbian stretch or jessie? You probably want stretch now. it's the latest stable and that's the one we're testing against
is the libboost-python1.62.0 package installed? if not you can install it with: apt-get install libboost-python1.62.0
2nd solution
A user [ko5win] in that link with your same problem confirmed that a fresh raspberry pi with stretch and the proper version of libboost solved the pip version issue
Another user [sergiomfsilva] gives an alternative procedure:
Environment
OS and version used
Linux raspberrypi 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l GNU/Linux
Python runtime used: Python 3.5.3
SDK version used: 1.3.1
Workaround steps used
Get images and prepare to do the work:
get last Raspbian Lite Image
flash microSD card for Raspberry Pi3
boot with raspberry pi
login with pi user
make the command
sudo su
go to root folder
cd /root
Update the system and make some time checks
Do the next commands:
apt-get update && apt-get upgrade
apt-get install ntp
Check the RPI date with the command
date
After date ok all its ready
Note: Configure ntp.conf file if date issues found
Install required packages and review the error reported
Install required packages
apt-get install -y git cmake build-essential curl libcurl4-openssl-dev libssl-dev uuid-dev python3-pip
SDK cloning
git clone --recursive https://github.com/Azure/azure-iot-sdk-python.git
Install device client package using pip3
pip3 install azure-iothub-device-client
Go to samples folder
cd azure-iot-sdk-python/device/samples/
Run the sample code
python3 iothub_client_sample.py
The error must be the same:
Traceback (most recent call last): File
"iothub_client_sample.py", line 10, in import
iothub_client File
"/usr/local/lib/python3.5/dist-packages/iothub_client/init.py",
line 1, in from .iothub_client import *
ImportError: libboost_python-py34.so.1.55.0: cannot open shared object
file: No such file or directory
Build new libraries and apply it
Go to building folder for linux
cd /root/azure-iot-sdk-python/build_all/linux
Run Setup
./setup.sh --python-version 3.5
Replace openssl dev with gnutls dev already reported like solution for a curl out of memory issue
apt remove libcurl4-openssl-dev
apt install libcurl4-gnutls-dev
build libraries
./build.sh --build-python 3.5
Go to root folder
cd /root
Move created library to python iothub_client path
mv azure-iot-sdk-python/device/samples/iothub_client.so /usr/local/lib/python3.5/dist-packages/iothub_client/iothub_client.so
Go to samples folder
cd azure-iot-sdk-python/device/samples/
Run the sample code
python3 iothub_client_sample.py
This solves the issue found and works in the raspberry. This did not solve this issue because it is related with the pip package. To solve a new pip package with library and python version updated
I have a GCE instance with Debian wheezy on it, I'm running my phython/Django code (my beckend) for an IOS application.
I'm trying to use a TSL push notification library but I'm failing to install it
sudo easy_install apns -
got an error: Setup script exited with error: file '/tmp/easy_install-sOkSjl/apns-2.0/apns-send' does not exist
sudo pip install apns -
got an Exception & error: [Errno 104] Connection reset by peer
sudo pip install pyapns -
didn't work either
if I copy it to my GCE instance how do I install & configure it, in Github documentation only states how to use easy_install.
When I was trying to install apns using pip, I also got the "apns-send does not exist" message. This was solved by downloading this script from their git repo and placing it in the build folder (in my case, build/apns).
For some reason, it seems it is not included in the version on PyPI.
My end goal is to install the requests module, and the way to do that seems to be with pip. I have looked through the pip install documentation here http://www.pip-installer.org/en/latest/installing.html
The documentation has offered me no help. It tells me to "securely download get-pyp.py". I have been searching for a way to do this, and so far, everything I have seen recommends the command
curl --silent --show-error --retry 5 https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python2.7
I have been unable to figure out how to use this command. Curl is not a python command. I installed curl for windows and ran this command in windows command line, which worked, but I was unable to proceed from there. Is this intended to be installed with windows command line, or something else? I am lost.
You can first install easy_install (which is part of set up tools) from the following location
https://pypi.python.org/pypi/setuptools#windows
Right click on the link and save the file ez_setup.py and then run it.
Once that is complete and you have added the scripts to your path variable (C...Python2.7..scripts), you can install pip using
easy_install pip
Check out this video for more help.
http://www.youtube.com/watch?v=MIHYflJwyLk&feature=youtu.be
Download the correct version from here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip
And can find more info in this question: How do I install pip on Windows?
I want to install OpenERP v7 on Mac OS X. How can I install it?
I tried to install it brew install postgresql I succeed to install postgresql but when I create the user with following command createuser openerpI got the error like
createuser:command not found I also got an error when I type psql.
Note: OpenERP is now called Odoo.
Make sure you have brew installed.
brew install postgresql
postgres -D /usr/local/var/postgres or launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
createdb odootest (not really needed if you use sample data)
git clone https://github.com/odoo/odoo.git, the repo is 500MB big so this takes a while
cd odoo
git checkout origin/7.0 switch to 7.0 branch (this should be a better command because it leaves me in detached head, please edit)
sudo python setup.py install, this will also install many dependencies with easy_install, ignore all the warnings
python openerp-server -s to start with sample data generated by odoo. If you
I also had to sudo easy_install pyPdf but I'm not sure if that's because I first tried the master branch. If you experience errors for missing libraries simply easy_install them.
Install PostgreSQL
Create a user for OpenERP
Install all dependencies for Python, using brew or MacPorts
Download OpenERP and extract it
Run the following command: cd openerp; python openerp-server