Python >=3.5.3 on Synology - python

i am trying to install Home Automatization (https://home-assistant.io) on my Synology. I've installed python via the synology packaging system, i've done basic setup (https://home-assistant.io/docs/installation/synology/) but when i try to run the daemon i see this in console:
homeassistant requires Python '>=3.5.3' but the running Python is 3.5.1
Is there any chance to update the python to required version on synology? Can you help me please?

Synology offers only python 3.5.1 at the moment.
You need to install older version of HA as mentioned on the installation page in blue box.
./python3 -m pip install homeassistant==0.64.3
If you would like to install latest HA, you would need to use docker instances on Synology, if your model supports it.
BTW.
Since the Python3 update (3.5.1-108) on Synology. once you install the HA you need to edit two files.
/volume1/#appstore/py3k/usr/local/bin/hass
and
/volume1/#appstore/py3k/usr/local/lib/python3.5/runpy.py
and add "import pip" to the beginning of the file where the import statements are. Otherwise HA will not start.

I've provided an updated python3-3.5.6 SPK for Synology in SynoCommunity; python3-3.6.8 is in the pipeline. Consider adding SynoCommunity ("spksrc") to your NAS to seamlessly install updates.
Additionally, be aware that home-assistant-0.82 is in beta at the same site.
Raw SPKs can be manually downloaded from my beta site if you want to check there as well, but I would suggest you look into SynoCommunity, keep updated from there, contribute comments and code there.

Related

Installing python-socketio-client

Please excuse my lack of knowledge and poor terminology.
I am trying to get python-socketio-client running on my PI3B. It is used by some python code, not written by me, that takes selected data from Volumio3.x's API (under Buster), and passes it to my audio preamp controller to display it. The current Artist and Song Title.
It all worked on my PI2B with a version of Volumio 2.x under Jessie.
All my attempts to install python-socketio-client have errored.
I was wondering if I should install it with python3, and if so how?
Thanks
To install python packages usually you have to run pip install -m package-name
For Volumio if you check documentation (pyvolumio package) is this the one you are trying to use?
Only Python 3.7 and above are supported.
As you can see in: https://pypi.org/project/pyvolumio/

0x80070643 error while installing Python 3.6

I'm actually using Python for an audio steganography project but I have some troubles.
I searched this error code on the forum, but I found things about SQL installations and not Python.
I'm trying to re-install Python 3.6.5 after an uninstall, because of a bug with pip.
I installed Python 2.7, Python 3.6.5, Python with VS 2017, before uninstall it because it wasn't working.
However, when I'm runing the installer as an administrator, hit "customize installation", tick everything excpet "balblalblabal (this requires VS 2015 or later)", and click on "install", it tells me that :
.
I realy need Python to work and I'm now stuck ...
If anybody here could help me, it would be nice !
Thanks all,
maleik.
PS : I have the log for you :*
The log link
I found this in the log file which you have attached. Try cleaning the registry with CC cleaner and give it a try. If it still doesn't work, try installing python with web installer Python Web Installed 3.6.5.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to install MSI package.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package.
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[2610:03A4][2018-12-05T20:46:18]i319: Applied execute package: core_AllUsers, result: 0x80070643, restart: None
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package
I installed python from Microsoft store after facing this problem and it magically got installed without any error as it may have directly been installed. I don't know but try if it eorks for you too.
You need to run the installation as a local administrator.
I had the same problem installing Python version 3.9 for the first time on my Windows 10, as this same problem happens to many users trying to install Python, the best solution I accidentally, just like #MANAN AGGARWAL discovered trying to check if I already had a version of Python installed on my computer by the DOS Command Prompt, was:
Open the DOS Command Prompt (cmd) and dictate "python": if a screen shows you a version, it's clearly not the first time you've installed Python, so if you want to upgrade you should try: https: / /www.delftstack.com/en/howto/python/how-to-update-python/ But if you've never installed any version of Python, the solution lies in updating your operating system to the latest version through Windows Update, and open the command prompt and type Python, or go directly to the Microsoft Store and search for Python followed by its latest version. It works without error.
** If by chance it does not automatically install on your PC after downloading, click "install on my devices" and select your computer name.
Why can't I install Python directly from the website file? Please note that when trying to install any software/applications from outside Microsoft's trusted locations, there are high chances of user settings interfering with the installation. When coming, for example, from the Microsoft Store, a chance of success is much greater, even without having problems related to User Permission Settings.
Another important thing to point out here is that installing a lot of software from outside Microsoft's trusted platforms can cause you to change some user permissions which can have positive effects with some software and negative effects with others, even with security your own system if you don't know what you're doing.
it's simple , Try Lower Version Like 'Python 3.6' but Download web install.
install it , then install last python version.
your python will update.
I've faced same/similar problem with installing Python 3.9.12 in a clean Windows 8.1 64-bit (VirtualBoxed test environment).
I thought the issue could have been fixed in a newer version of Python, but the freshest 3.10.10 fails with same issue.
The original log isn't available any longer, but luckily it is quoted in another answer, and the following line reveals the real problem:
Applied execute package: core_AllUsers, result: 0x80070643, restart: None
My log looks the same, and if you scroll the log up, you'll discover that core_AllUsers is a UCRT MSI-installer, which is downloaded from Python site (for 3.10.10 64-bit the link may look like https://www.python.org/ftp/python/3.10.10/amd64/ucrt.msi).
If you download it manually (Python installer is smart enough to do a cleanup even if it fails, so you won't find this MSI in a local cache) and run, it will probably crash. And if it is your case, I have a simple solution - just install update KB2999226 (Update for Universal C Runtime) for your OS, which you can download from Microsoft.
I also faced the similar issue. What the trick worked for me is I installed it for the individual user (as earlier installation was for the all users).
So earlier if one has installed it for the all users then install it for the specific user and vice versa.
I know this is not the resolution of the error faced. However, this approach will install Python which is the main motive to achieve.
I encountered the same issue after installing a fresh Windows 8.1 on my PC.
I solved that by using the Python v3.9 web installation file which you can find here.
However, you can choose any other version that has a web installation file
Note: You need internet connection to use this method.

Robot Framework with Pycharm -- Autocomplete doesn't work

I've installed PyCharm with the robotframework support plugin.
The .robot files are identified successfully and I was able to create a simple script and run it in pyCharm.
However, my problem is that no keywords nor even the robotframework libraries (selenium2library) are recognized by pycharm in order to be autocompleted when typing them.
I also have the intellibot plugin installed.
Is there something that I'm missing? Is there another configuration file somewhere?
Thanks,
Try to set up your Library to robotframework-selenium2library == 1.8.0, then the issue will disappear.
If you have the last version it doesn't work for me.
My solution:
Uninstall the 'Robot framework support' (PyCharm/File/Settings/Plugins)
Uninstall 'Intellibot' (PyCharm/File/Settings/Plugins) (Uninstall all similar plugins!)
Exit PyCharm
Uninstall robotframework-seleniumlibrary (Open command prompt with administration mode: pip uninstall robotframework-seleniumlibrary)
Install robotframework-seleniumlibrary 3.3.1 (Command prompt: pip install robotframework-seleniumlibrary==3.3.1)
Open PyCharm
Install 'IntelliBot #SeleniumLibrary Patched' (PyCharm/File/Settings/Plugins)
(If it isn't working then try the following: PyCharm/File/Invalidate Caches/Restart... and click the 'Invalidate and Restart')
There is a bug in the intellibot plugin.
To resolve you need to
1. Uninstall your current intellibot plugin
2. Search for "IntelliBot #SeleniumLibrary Patched" in the plugins repository.
3. Install this patched plugin.
This worked for me.
You can try install "Robot Framework support" plugin.
it working for me.
use plugin Intellbot#SeleniumLibrary Patched
and robotframework-seleniumlibrary version 3.3.1
It works for me after lot of research from the internet
I recomend to use lte2000 fork: https://github.com/lte2000/intellibot
It works fine for me (Pycharm 2020.1, Robot Framework 3.2.2 and SeleniumLibrary 4.5.0)
In our main_resources.robot we need to give file path as below for the library files which contain definition of function
Library ../lib/SampleRest/SampleRest.py
When you do cntl+click on above SampleRest.py it should be navigated to that file
Your SampleRest.py should contain all your function definitions as below
try:
from .api import *
except:
from api import *
class SampleRest(
events,
repository,
devices
):
"""
This library will provides keywords to automating the cloud test cases
"""
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LIBRARY_VERSION = 1.0
def __init__(self):
for base in SampleRest.__bases__:
base.__init__(self)
Once I declare this I can use any of functions present in above devices.py file from robot file and it will be successfully navigated
Also please check your robotframework-seleniumlibrary version it should be 3.3.1 because for latest version navigation is an issue
I have been troubled by this for what seems to be forever.
Here are my configuration steps, and so far everything is working like a charm.
My setup:
Installed Python 3.9.x => added path to variables in "windows environment Variables" Check python and pip versions.
install selenium
install robotframework
install robotframework-seleniumlibrary
Install Pycharm and set Interpreter to Python 3.9.x
Install Plugin: "IntelliBot #SeleniumLibrary Patched" - Do not install Selenium2Library This is what causes the IDE issues.
Restart IDE and enjoy. And for those just getting into Robotframework, dont forget to add webdrivers.
For this I made a folder in root (called it webdrivers) and also added this to my Windows Enviro variables. This allows me to call them from any project folder.
I am going through the same problems... I've tried IntelliBot, IntelliBot #patched, Robot Framework Support plugins.
Now I am testing the Hyper RobotFramework Support plugin [link] and for now, looks the best from all of these.
With it I have some auto-complete support, also ctrl+click (navigation) works nice (better than in IntelliBot). Not perfect, but the best it has been so far.
I have installed:
PyCharm 2021.3.2
Python 3.10.2
Robot Framework 4.1.3
selenium 4.1.3
robotframework-seleniumlibrary 6.0.0
(on windows you can run the command pip list to see the version of the libraries that have been installed using pip)

wxPython for Framework distribution rather than Conda

I've been struggling with getting wxPython work - I'm running a Mac, OSX 10.11.6 El Captain, so the pip install runs into /src/osx/cocoa/mediactrl.mm:52:10: fatal error: 'QTKit/QTKit.h' file not found with the new XCode, and some changes there, and won't compile. So I found an installer, that at least gets it done.
But then wx runs (I only tried to import it in fact) in my conda python 2.7.12.
My goal is to be able to play around with TensorKart and since my default python is conda, when attempting to run the repo, it tells me the usual:
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.
I found how George Reilly explains here what to do, but I cannot find the wxredirect.pth and don't know what to do with the bash script. I only have wx.pth within the conda site-packages.
So is it somehow possible to get the wxPython for my Framework 2.7.10 with the .dmg installer? After 6 hours of struggle it seems like the easiest way.
I tried:
copy conda site-packages having to do with wxPython into site-packages within a virtualenv created form the Framework Python as it was in the original G. Reilly's post which no longer works.
create alias in .bash_profile that python is the Framework version but it didn't help.
Thanks a lot!

Ubuntu, how do you remove all Python 3 but not 2

I have recently get hold of a RackSpace Ubuntu server and it has pythons all over the place:
iPython in 3.5, Pandas in 3.4 &2.7, modules I need like pyodbc etc. are only in 2,7
Therefore, I am keen to clean up the box and, as a 2.7 users, keep everything in 2.7.
So the key question is, is there a way to remove both 3.4 and 3.5 efficiently at the same time while keeping Python 2.7?
Removing Python 3 was the worst thing I did since I recently moved to the world of Linux. It removed Firefox, my launcher and, as I read while trying to fix my problem, it may also remove your desktop and terminal! Finally fixed after a long daytime nightmare. Just don't remove Python 3. Keep it there!
If that happens to you, here is the fix:
https://askubuntu.com/q/384033/402539
https://askubuntu.com/q/810854/402539
EDIT: As pointed out in recent comments, this solution may BREAK your system.
You most likely don't want to remove python3.
Please refer to the other answers for possible solutions.
Outdated answer (not recommended)
sudo apt-get remove 'python3.*'
So I worked out at the end that you cannot uninstall 3.4 as it is default on Ubuntu.
All I did was simply remove Jupyter and then alias python=python2.7 and install all packages on Python 2.7 again.
Arguably, I can install virtualenv but me and my colleagues are only using 2.7. I am just going to be lazy in this case :)
First of all, don't try the following command as suggested by Germain above.
`sudo apt-get remove 'python3.*'`
In Ubuntu, many software depends upon Python3 so if you will execute this command it will remove all of them as it happened with me. I found following answer useful to recover it.
https://askubuntu.com/questions/810854/i-deleted-package-python3-on-ubuntu-and-i-have-lost-dashboard-terminal-and-un
If you want to use different python versions for different projects then create virtual environments it will be very useful. refer to the following link to create virtual environments.
Creating Virtual Environment also helps in using Tensorflow and Keras in Jupyter Notebook.
https://linoxide.com/linux-how-to/setup-python-virtual-environment-ubuntu/
neither try any above ways nor sudo apt autoremove python3 because it will remove all gnome based applications from your system including gnome-terminal. In case if you have done that mistake and left with kernal only than trysudo apt install gnome on kernal.
try to change your default python version instead removing it. you can do this through bashrc file or export path command.
Its simple
just try:
sudo apt-get remove python3.7 or the versions that you want to remove

Categories

Resources