teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 18, 2021 3:03:53 GMT -8
Try sudo pip3 install vcgencmd Jason I have installed vcgencmd -returned an error directing me to status_page.py. I then went into status_page.py and changed "import vcgencmd from Vcgencmd" to "import vcgencmd from vcgencmd" (decapitalized it), and I got a better response - see image 1, and the dash page now renders up, but is grey and blank. After about a minute, I then get the error page in image 2..... Issues pics 4.docx (1.29 MB)
|
|
|
Post by Jason on Jun 18, 2021 5:15:08 GMT -8
Unfortunately, vcgencmd is the library name and not callable. Can you revert your changes and post the error?
Thanks,
Jason
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 21, 2021 0:04:09 GMT -8
Unfortunately, vcgencmd is the library name and not callable. Can you revert your changes and post the error? Thanks, Jason Dear Jason and others, I have reset all parameters to the default and the issue is back as it was at initial set up - import error, 'cannot import Vcgencmd from vcgencmd', as shown in the image. I have successfully installed vcgencmd so some further thoughts would be much appreciated - this is the main aspect of functionality for our projects. Issue dash_app issue.docx (331.56 KB)
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 21, 2021 0:52:17 GMT -8
Unfortunately, vcgencmd is the library name and not callable. Can you revert your changes and post the error? Thanks, Jason Dear Jason and others, I have reset all parameters to the default and the issue is back as it was at initial set up - import error, 'cannot import Vcgencmd from vcgencmd', as shown in the image. I have successfully installed vcgencmd so some further thoughts would be much appreciated - this is the main aspect of functionality for our projects. Is this a Path issue? Issue View Attachment
|
|
|
Post by Jason on Jun 21, 2021 5:54:15 GMT -8
Can you please confirm you performed the installation as sudo? If you're not sure, please run the command sudo pip3 install vcgencmd again and post the output.
Thanks,
Jason
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 21, 2021 8:20:29 GMT -8
Can you please confirm you performed the installation as sudo? If you're not sure, please run the command sudo pip3 install vcgencmd again and post the output. Thanks, Jason Hmm. Installed without sudo, but error when done as sudo: Attachments:
|
|
|
Post by Jason on Jun 21, 2021 8:36:51 GMT -8
Are you running inside a virtual environment?
Thanks,
Jason
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 21, 2021 9:10:01 GMT -8
Are you running inside a virtual environment? Thanks, Jason No. I tried to follow the advice to install vcgencmd through venv, but got the same error. I don't understand why I would experience an issue such as this on a supplied SD card..
|
|
|
Post by Jason on Jun 21, 2021 10:02:33 GMT -8
Okay good! You definitely don't want to use a virtual environment. All of the setup of the SD card expects everything to be run and installed by root including vcgencmd. So just to confirm, you installed vcgencmd using the command sudo pip3 install vcgencmd outside a virtual environment and are still getting the same error?
Thanks,
Jason
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 21, 2021 23:49:17 GMT -8
Okay good! You definitely don't want to use a virtual environment. All of the setup of the SD card expects everything to be run and installed by root including vcgencmd. So just to confirm, you installed vcgencmd using the command sudo pip3 install vcgencmd outside a virtual environment and are still getting the same error? Thanks, Jason Dear Jason, I can confirm that I have no venv and when running 'sudo pip3 install vcgencmd' I get the same error: Looking in indexes: pypi.org/simple, www.piwheels.org/simple Requirement already satisfied: vcgencmd in /usr/local/lib/python3.7/dist-packages (0.1.0) WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: pip.pypa.io/warnings/venvDan.
|
|
|
Post by Jason on Jun 22, 2021 3:35:06 GMT -8
I'm surprised a warning is blocking the install. Can you post a full screenshot of the install? Also, it looks like your system already recognizes the installation of the package. Have you tried to run sudo python3 index.py to start the Dash app?
Thanks,
Jason
|
|
dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on Jun 22, 2021 9:24:08 GMT -8
Try this command to see where your local copy of the vcgencmd module is located: pi@SwitchDocLabs:~ $ pip show vcgencmd Name: vcgencmd Version: 0.1.1 Summary: Python binding for RaspberryPi vcgencmd command-line tool Home-page: https://github.com/sushantnadkar/vcgencmd.git Author: Sushant Nadkar Author-email: None License: The MIT License (MIT) Location: /usr/local/lib/python3.7/dist-packages Requires: Required-by:
Here is a way to find what the python3 module path variable is: pi@SwitchDocLabs:~ $ python3 Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/pi/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/local/lib/python3.7/dist-packages/rpi_ws281x-1.0.0-py3.7-linux-armv7l.egg', '/usr/local/lib/python3.7/dist-packages/bmp280-0.0.3-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.3-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO-1.0.4-py3.7.egg', '/usr/lib/python3/dist-packages']
There is a page I found about locating python virtual environments from a python programmer that must create a bunch of them and then forget where they are: bhupesh-v.github.io/find-all-python-virtual-environments-in-your-system/If you try the find command he provides, then you shouldn't find anything. But, if you do, then you actually have a virtual environment that got created somehow. Dow
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 23, 2021 0:06:00 GMT -8
Try this command to see where your local copy of the vcgencmd module is located: pi@SwitchDocLabs:~ $ pip show vcgencmd Name: vcgencmd Version: 0.1.1 Summary: Python binding for RaspberryPi vcgencmd command-line tool Home-page: https://github.com/sushantnadkar/vcgencmd.git Author: Sushant Nadkar Author-email: None License: The MIT License (MIT) Location: /usr/local/lib/python3.7/dist-packages Requires: Required-by:
Here is a way to find what the python3 module path variable is: pi@SwitchDocLabs:~ $ python3 Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/pi/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/local/lib/python3.7/dist-packages/rpi_ws281x-1.0.0-py3.7-linux-armv7l.egg', '/usr/local/lib/python3.7/dist-packages/bmp280-0.0.3-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.3-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO-1.0.4-py3.7.egg', '/usr/lib/python3/dist-packages']
There is a page I found about locating python virtual environments from a python programmer that must create a bunch of them and then forget where they are: bhupesh-v.github.io/find-all-python-virtual-environments-in-your-system/If you try the find command he provides, then you shouldn't find anything. But, if you do, then you actually have a virtual environment that got created somehow. Dow Dear Dow, Many thanks. The outcome of these commands was as follows: 1. pi@SwitchDocLabs:~/SDL_Pi_SkyWeather2 $ pip show vcgencmd Name: vcgencmd Version: 0.1.0 Summary: Native binding for vcgencmd Home-page: github.com/nicmcd/vcgencmdAuthor: Nic McDonald Author-email: nicci02@hotmail.com License: Apache License Version 2.0 Location: /usr/local/lib/python3.7/dist-packages Requires: Required-by: 2. pi@SwitchDocLabs:~/SDL_Pi_SkyWeather2 $ python3 Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/home/pi/.local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/dist-packages', '/usr/local/lib/python3.7/dist-packages/rpi_ws281x-1.0.0-py3.7-linux-armv7l.egg', '/usr/local/lib/python3.7/dist-packages/bmp280-0.0.3-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO-1.0.3-py3.7.egg', '/usr/local/lib/python3.7/dist-packages/Adafruit_PureIO-1.0.4-py3.7.egg', '/usr/lib/python3/dist-packages'] 3. No virtual environments running: pi@SwitchDocLabs:~ $ find /home -name "*activate" pi@SwitchDocLabs:~ $ I am not experienced enough to know what use this is to me so any further ideas would be very welcome.
|
|
teech
New Member
Posts: 19
Raspberry Pi: Yes
|
Post by teech on Jun 23, 2021 3:06:43 GMT -8
I'm surprised a warning is blocking the install. Can you post a full screenshot of the install? Also, it looks like your system already recognizes the installation of the package. Have you tried to run sudo python3 index.py to start the Dash app? Thanks, Jason Dear Jason. This is the full detail of the install attempts. pi@SwitchDocLabs:~ $ cd SDL_Pi_SkyWeather2 pi@SwitchDocLabs:~/SDL_Pi_SkyWeather2 $ sudo pip3 install vcgencmd Looking in indexes: pypi.org/simple, www.piwheels.org/simpleRequirement already satisfied: vcgencmd in /usr/local/lib/python3.7/dist-packages (0.1.0) WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: pip.pypa.io/warnings/venvpi@SwitchDocLabs:~/SDL_Pi_SkyWeather2 $
|
|
|
Post by Jason on Jun 23, 2021 5:38:47 GMT -8
pi@SwitchDocLabs:~/SDL_Pi_SkyWeather2 $ sudo pip3 install vcgencmd Looking in indexes: pypi.org/simple, www.piwheels.org/simpleRequirement already satisfied: vcgencmd in /usr/local/lib/python3.7/dist-packages (0.1.0) That's good new. The line "Requirement already satisfied..." means your Pi already has the libraries necessary to use vcgencmd. Here's how it looks on my Pi. pi@PiSkyWeather2:~ $ sudo pip3 install vcgencmd Looking in indexes: pypi.org/simple, www.piwheels.org/simpleRequirement already satisfied: vcgencmd in /usr/local/lib/python3.7/dist-packages (0.1.1)pi@PiSkyWeather2:~ $ python3 Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from vcgencmd import Vcgencmd >>> I'll like you to try the following: 1. SSH to your Pi. 2. Type python3 and hit enter to open the Python REPL 3. Type import vcgencmd and hit enter If no error occurs, vcgencmd is installed correctly. If an error occurs, post the results. Thanks, Jason
|
|