Python >=3.5.3 on Synology

synology
Tags: #<Tag:0x00007f47fe7b2378>

#21

Hey dude …

Checked you package out … seems to be missing sqlite … everything works apart from that …

No module named ‘_sqlite3’

I wonder why no one else continued on this … maybe because of the weird user name laugh


#22

hi,
i added this to my sources :
http://spk.chickenandporn.com/
uninstalled original python, installed new python 3.5.5.7 , git
then installed homeassistant from hat source, installed succesful
but i doesnt seems to start, when i start it, it immediately stops

any ideas?


#23

i also had to install older PIP 8.1.2 , then homeassistant started up , but indeed, i also have this error in log :

2018-08-07 10:52:50 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: No module named ‘_sqlite3’ (retrying in 3 seconds)

PS: installed homeassistant from original guide, since now i installed a newer python version
everythings start with pip 8.1.2 , instead of 9.xxx
only the sql lite issue now


#24

Missing _sqlite3 is an issue I’m trying to resolve. Python3 now does a lot of “magic” in its setup.py, it’s a case of teaching/misleading it to do the right thing. This also means that each change takes ~20 min to build for test.

I appreciate Pergola.Fabio’s info about downgrading pip v9 -> v8.1.2; I’ll probably need to do the same after this _sqlite3 hurdle.


#25

Thank you for your work! I’m currently working on a DS214. Installed your latest python3 package but getting the following error:

/volume1/@appstore/python3/usr/bin# ./python3.5
-ash: ./python3.5: cannot execute binary file: Exec format error

Any idea what the issue might be?


#26

Finally Work’s! Thanks man!!


#27

Hi everyone, I’m having some trouble installing home assistant after I installed the python3.5.5 package from here.

The error I encounter is “Failed building the wheel for bcrypt” and “Failed building wheel for cryptography”.
and couldn’t even finish the HA install process.
Is there anyway to fix this?
My NAS is DS212J

Thanks :slight_smile:


#28

You need to cross-compile these packages for your synology architecture. Had the same issue also.

See my comment for a short summary of what i did to make it work:


#29

Thank you so much :slight_smile:
I’m not sure I understand how to do everything but I’ll try ~~
another question, is it possible to run home bridge on DS212J, cause I also ran into some problem when I tried last time.

just curious… is it possible I can just copy your wheel file from your step 5 and install it? @@


#30

I had some problem doing it…please [email protected]@
3.) modified the “requirements.txt” file of the python3 package and added the package I need to get cross-compiled (e.g. cffi==1.11.5)

 I edited the requirements.txt file in the spksrc/spk/python3/src
 and added the "cffi==1.11.5" under this section ## Cross-compiled via spksrc.wheel.mk
 it that right?

4.) build the python3 spk again. the toolchain automatically cross-compiles the added package and stores it as pre-compiled wheel in the subfolder wheelhouse inside the spk file.

than I ran "make arch-88f6281" again to build it. 
(the second time took way less time than the first time)

5.) extract the wheel file from the spk, copy to nas and install manually with pip. voila!

than... I completely stuck here... not sure which file to copy and how to in [email protected]@....

Sorry about asking a lot…it’s just out of my knowledge too much ~


#31

hi thy1225,
my wheel files won’t work for you, because I have a different architecture.

point 3 and 4 look good. (I don’t know if the toolchain can handle incremental make, so to be on the safe side call make clean before calling make with your architecture again.

point 5:
after successful build you should find a spk file in folder /spksrc/packages. It is actually an archive you can open for example with 7-zip. Then open the archives inside the archive until you find a folder share/wheelhouse. Here you should find several whl files. Extract and copy cffi to your synology. Install the whl file with pip: pip install cffiXXX.whl.


#32

Hi yogi1200,

“Solved it!! XD I wrote down what I did in the next reply”

Thanks for explaining~ I finished the point 5! :slight_smile:
but I still got error installing the latest home assistant (0.80.3)
it does have some error message but I cannot figure out how to solve it.
something like these:

Building wheels for collected packages: bcrypt, cryptography
Running setup.py bdist_wheel for bcrypt … error

Exception: Version mismatch: this is the ‘cffi’ package version 1.11.5, located in ‘/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py’. When we import the top-level ‘_cffi_backend’ extension module, we get version 1.11.2, located in ‘/volume1/@appstore/python3/lib/python3.5/site-packages/_cffi_backend.cpython-35m-arm-linux-gnueabi.so’. The two versions should be equal; check your installation.

Failed building wheel for bcrypt

and a lot of other errors…

Do you think you can take a look for me?
Thank you very much~
the full log is down here:

[email protected]:/volume1/@appstore/python3/bin# ./python3 -m pip install --upgrade homeassistant
Collecting homeassistant
  Using cached https://files.pythonhosted.org/packages/c0/d5/1c17e38a185fc2ee95ef17c410760c2766cef09899ace54815d164013f12/homeassistant-0.80.3-py3-none-any.whl
Collecting pip>=8.0.3 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Collecting aiohttp==3.4.4 (from homeassistant)
Requirement already up-to-date: pyyaml<4,>=3.13 in /volume1/@appstore/python3/lib/python3.5/site-packages (from homeassistant)
Collecting voluptuous-serialize==2.0.0 (from homeassistant)
Collecting attrs==18.2.0 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a514/attrs-18.2.0-py2.py3-none-any.whl
Requirement already up-to-date: PyJWT==1.6.4 in /volume1/@appstore/python3/lib/python3.5/site-packages (from homeassistant)
Collecting async-timeout==3.0.0 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/96/0f/e6357458c87fb4ed8f3df215773f3caad40968f10e05552cbd8bd28415e4/async_timeout-3.0.0-py3-none-any.whl
Requirement already up-to-date: voluptuous==0.11.5 in /volume1/@appstore/python3/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: jinja2>=2.10 in /volume1/@appstore/python3/lib/python3.5/site-packages (from homeassistant)
Collecting bcrypt==3.1.4 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz
Collecting cryptography==2.3.1 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/22/21/233e38f74188db94e8451ef6385754a98f3cad9b59bedf3a8e8b14988be4/cryptography-2.3.1.tar.gz
Requirement already up-to-date: certifi>=2018.04.16 in /volume1/@appstore/python3/lib/python3.5/site-packages (from homeassistant)
Collecting requests==2.19.1 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Collecting astral==1.6.1 (from homeassistant)
  Using cached https://files.pythonhosted.org/packages/01/2b/0b60f1cef7d2a7a863cd06bae5fc7e3553803739c4834e921b4996920f76/astral-1.6.1-py2.py3-none-any.whl
Requirement already up-to-date: pytz>=2018.04 in /volume1/@appstore/python3/lib/python3.5/site-packages (from homeassistant)
Requirement already up-to-date: multidict<5.0,>=4.0 in /volume1/@appstore/python3/lib/python3.5/site-packages (from aiohttp==3.4.4->homeassistant)
Requirement already up-to-date: idna-ssl>=1.0; python_version < "3.7" in /volume1/@appstore/python3/lib/python3.5/site-packages (from aiohttp==3.4.4->homeassistant)
Collecting yarl<2.0,>=1.0 (from aiohttp==3.4.4->homeassistant)
Requirement already up-to-date: chardet<4.0,>=2.0 in /volume1/@appstore/python3/lib/python3.5/site-packages (from aiohttp==3.4.4->homeassistant)
Collecting MarkupSafe>=0.23 (from jinja2>=2.10->homeassistant)
Requirement already up-to-date: cffi>=1.1 in /volume1/@appstore/python3/lib/python3.5/site-packages (from bcrypt==3.1.4->homeassistant)
Requirement already up-to-date: six>=1.4.1 in /volume1/@appstore/python3/lib/python3.5/site-packages (from bcrypt==3.1.4->homeassistant)
Collecting idna>=2.1 (from cryptography==2.3.1->homeassistant)
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography==2.3.1->homeassistant)
  Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting urllib3<1.24,>=1.21.1 (from requests==2.19.1->homeassistant)
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.1->bcrypt==3.1.4->homeassistant)
Building wheels for collected packages: bcrypt, cryptography
  Running setup.py bdist_wheel for bcrypt ... error
  Complete output from command /volume1/@appstore/python3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ppqn68jb/bcrypt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmphhr1esx8pip-wheel- --python-tag cp35:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-ppqn68jb/bcrypt/setup.py", line 238, in <module>
      **keywords_with_side_effects(sys.argv)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 334, in __init__
      _Distribution.__init__(self, attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/dist.py", line 281, in __init__
      self.finalize_options()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 468, in finalize_options
      ep.load()(self, ep.name, value)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 204, in cffi_modules
      add_cffi_module(dist, cffi_module)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
      execfile(build_file_name, mod_vars)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 25, in execfile
      exec(code, glob, glob)
    File "src/build_bcrypt.py", line 21, in <module>
      ffi = FFI()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py", line 54, in __init__
      backend.__version__, backend.__file__))
  Exception: Version mismatch: this is the 'cffi' package version 1.11.5, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.11.2, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/_cffi_backend.cpython-35m-arm-linux-gnueabi.so'.  The two versions should be equal; check your installation.
  
  ----------------------------------------
  Failed building wheel for bcrypt
  Running setup.py clean for bcrypt
  Complete output from command /volume1/@appstore/python3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ppqn68jb/bcrypt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-ppqn68jb/bcrypt/setup.py", line 238, in <module>
      **keywords_with_side_effects(sys.argv)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 334, in __init__
      _Distribution.__init__(self, attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/dist.py", line 281, in __init__
      self.finalize_options()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 468, in finalize_options
      ep.load()(self, ep.name, value)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 204, in cffi_modules
      add_cffi_module(dist, cffi_module)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
      execfile(build_file_name, mod_vars)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 25, in execfile
      exec(code, glob, glob)
    File "src/build_bcrypt.py", line 21, in <module>
      ffi = FFI()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py", line 54, in __init__
      backend.__version__, backend.__file__))
  Exception: Version mismatch: this is the 'cffi' package version 1.11.5, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.11.2, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/_cffi_backend.cpython-35m-arm-linux-gnueabi.so'.  The two versions should be equal; check your installation.
  
  ----------------------------------------
  Failed cleaning build dir for bcrypt
  Running setup.py bdist_wheel for cryptography ... error
  Complete output from command /volume1/@appstore/python3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ppqn68jb/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp056sx2owpip-wheel- --python-tag cp35:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-ppqn68jb/cryptography/setup.py", line 318, in <module>
      **keywords_with_side_effects(sys.argv)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 334, in __init__
      _Distribution.__init__(self, attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/dist.py", line 281, in __init__
      self.finalize_options()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 468, in finalize_options
      ep.load()(self, ep.name, value)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 204, in cffi_modules
      add_cffi_module(dist, cffi_module)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
      execfile(build_file_name, mod_vars)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 25, in execfile
      exec(code, glob, glob)
    File "src/_cffi_src/build_openssl.py", line 106, in <module>
      extra_link_args=extra_link_args(compiler_type()),
    File "/tmp/pip-build-ppqn68jb/cryptography/src/_cffi_src/utils.py", line 49, in build_ffi_for_binding
      extra_link_args=extra_link_args,
    File "/tmp/pip-build-ppqn68jb/cryptography/src/_cffi_src/utils.py", line 57, in build_ffi
      ffi = FFI()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py", line 54, in __init__
      backend.__version__, backend.__file__))
  Exception: Version mismatch: this is the 'cffi' package version 1.11.5, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.11.2, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/_cffi_backend.cpython-35m-arm-linux-gnueabi.so'.  The two versions should be equal; check your installation.
  
  ----------------------------------------
  Failed building wheel for cryptography
  Running setup.py clean for cryptography
  Complete output from command /volume1/@appstore/python3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ppqn68jb/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-ppqn68jb/cryptography/setup.py", line 318, in <module>
      **keywords_with_side_effects(sys.argv)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 334, in __init__
      _Distribution.__init__(self, attrs)
    File "/volume1/@appstore/python3/lib/python3.5/distutils/dist.py", line 281, in __init__
      self.finalize_options()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 468, in finalize_options
      ep.load()(self, ep.name, value)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 204, in cffi_modules
      add_cffi_module(dist, cffi_module)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
      execfile(build_file_name, mod_vars)
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 25, in execfile
      exec(code, glob, glob)
    File "src/_cffi_src/build_openssl.py", line 106, in <module>
      extra_link_args=extra_link_args(compiler_type()),
    File "/tmp/pip-build-ppqn68jb/cryptography/src/_cffi_src/utils.py", line 49, in build_ffi_for_binding
      extra_link_args=extra_link_args,
    File "/tmp/pip-build-ppqn68jb/cryptography/src/_cffi_src/utils.py", line 57, in build_ffi
      ffi = FFI()
    File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py", line 54, in __init__
      backend.__version__, backend.__file__))
  Exception: Version mismatch: this is the 'cffi' package version 1.11.5, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.11.2, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/_cffi_backend.cpython-35m-arm-linux-gnueabi.so'.  The two versions should be equal; check your installation.
  
  ----------------------------------------
  Failed cleaning build dir for cryptography
Failed to build bcrypt cryptography
Installing collected packages: pip, attrs, async-timeout, idna, yarl, aiohttp, voluptuous-serialize, bcrypt, asn1crypto, cryptography, urllib3, requests, astral, homeassistant, MarkupSafe, pycparser
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
  Found existing installation: attrs 17.4.0
    Uninstalling attrs-17.4.0:
      Successfully uninstalled attrs-17.4.0
  Found existing installation: async-timeout 2.0.0
    Uninstalling async-timeout-2.0.0:
      Successfully uninstalled async-timeout-2.0.0
  Found existing installation: idna 2.6
    Uninstalling idna-2.6:
      Successfully uninstalled idna-2.6
  Found existing installation: yarl 1.1.0
    Uninstalling yarl-1.1.0:
      Successfully uninstalled yarl-1.1.0
  Found existing installation: aiohttp 2.3.10
    Uninstalling aiohttp-2.3.10:
      Successfully uninstalled aiohttp-2.3.10
  Found existing installation: bcrypt 3.1.2
    Uninstalling bcrypt-3.1.2:
      Successfully uninstalled bcrypt-3.1.2
  Running setup.py install for bcrypt ... error
    Complete output from command /volume1/@appstore/python3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ppqn68jb/bcrypt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-cidwr6y2-record/install-record.txt --single-version-externally-managed --compile:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-ppqn68jb/bcrypt/setup.py", line 238, in <module>
        **keywords_with_side_effects(sys.argv)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/volume1/@appstore/python3/lib/python3.5/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 334, in __init__
        _Distribution.__init__(self, attrs)
      File "/volume1/@appstore/python3/lib/python3.5/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/setuptools/dist.py", line 468, in finalize_options
        ep.load()(self, ep.name, value)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 204, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "src/build_bcrypt.py", line 21, in <module>
        ffi = FFI()
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py", line 54, in __init__
        backend.__version__, backend.__file__))
    Exception: Version mismatch: this is the 'cffi' package version 1.11.5, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/cffi/api.py'.  When we import the top-level '_cffi_backend' extension module, we get version 1.11.2, located in '/volume1/@appstore/python3/lib/python3.5/site-packages/_cffi_backend.cpython-35m-arm-linux-gnueabi.so'.  The two versions should be equal; check your installation.
    
    ----------------------------------------
  Rolling back uninstall of bcrypt
Command "/volume1/@appstore/python3/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ppqn68jb/bcrypt/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-cidwr6y2-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ppqn68jb/bcrypt/

#33

Never mind :smile:~
I managed to fix it!!!
I solved the mismatch problem by uninstall the cffi first and delete the cffi_backend file that still lifted in the “site-packages” folder.
and solved the bcrypt, cryptography by adding them both to the “requirements.txt” in the cross-compiled section, then installed them using pip.
after successfully installed the home assistant 0.80.3
When starting the home assistant the first time, the log showed that it attempted to install some packages “peyote, PyQRCode, pho-mqtt…”, so I when back to the “requirements.txt” and add them in the list to build and get the wheel file again… and installed them with pip.
after all that~ now I have the 0.80.3 running :slight_smile:

Thanks again for your BIG help~!!!


#34

Hello. Good job to all that in the end make running the last version of HA possible for the non docker Synologys.

Can someone make a complete detailed guide into one big post for the other users, please?

@thy1225 is 0.80.3 running smoothly? Any bugs or glitches so far?


#35

Thanks for this forum and you guys~ :slight_smile:
It’s usable to me but not everything is working right~
I don’t have many devices, all I have is two switches and two camera (all works)

“HomeKit” & “cloud” both doesn’t work…
About HomeKit according to the log I cross-compiled and installed “HAP-python, ed25519, curve25519_donna and pycryptodome”, but it still give me this error

    2018-10-25 11:35:54 ERROR (MainThread) [homeassistant.setup] Error during setup of component homekit
    Traceback (most recent call last):
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/homeassistant/setup.py", line 145, in _async_setup_component
        hass, processed_config)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/homeassistant/components/homekit/__init__.py", line 81, in async_setup
        await hass.async_add_job(homekit.setup)
      File "/volume1/@appstore/python3/lib/python3.5/asyncio/futures.py", line 381, in __iter__
        yield self  # This tells Task to wait for completion.
      File "/volume1/@appstore/python3/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
        future.result()
      File "/volume1/@appstore/python3/lib/python3.5/asyncio/futures.py", line 294, in result
        raise self._exception
      File "/volume1/@appstore/python3/lib/python3.5/concurrent/futures/thread.py", line 55, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/homeassistant/components/homekit/__init__.py", line 210, in setup
        from .accessories import HomeBridge, HomeDriver
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/homeassistant/components/homekit/accessories.py", line 8, in <module>
        from pyhap.accessory_driver import AccessoryDriver
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/pyhap/accessory_driver.py", line 44, in <module>
        from pyhap.encoder import AccessoryEncoder
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/pyhap/encoder.py", line 9, in <module>
        import ed25519
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/ed25519/__init__.py", line 1, in <module>
        from .keys import (BadSignatureError, BadPrefixError,
      File "/volume1/@appstore/python3/lib/python3.5/site-packages/ed25519/keys.py", line 3, in <module>
        from . import _ed25519
    ImportError: cannot import name '_ed25519'

About the Cloud, “logins” and “forgot my password” both doesn’t work, it’ll show “Unknown error” in the web UI. The first time I run HA with cloud I saw the log is trying to install “warrant, pyfttt”, I want to cross-compile the “warrant” but it failed… with something like:

from pip.req import parse_requirements
ImportError: No module named pip.req

right now every time I try to use the cloud login or reseting the password, I’ll get this error:

2018-10-25 11:36:00 INFO (MainThread) [homeassistant.components.http.view] Serving /api/websocket to 192.168.0.114 (auth: False)
2018-10-25 11:36:01 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/token to 192.168.0.114 (auth: False)
ore/python3/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/volume1/@appstore/python3/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/volume1/@appstore/python3/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/homeassistant/components/cloud/auth_api.py", line 81, in forgot_password
    cognito = _cognito(cloud, username=email)
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/homeassistant/components/cloud/auth_api.py", line 140, in _cognito
    from warrant import Cognito
  File "/volume1/homeassistant/deps/lib/python3.5/site-packages/warrant/__init__.py", line 8, in <module>
    from jose import jwt, JWTError
  File "/volume1/homeassistant/deps/lib/python3.5/site-packages/jose/jwt.py", line 11, in <module>
    from jose import jws
  File "/volume1/homeassistant/deps/lib/python3.5/site-packages/jose/jws.py", line 8, in <module>
    from jose import jwk
  File "/volume1/homeassistant/deps/lib/python3.5/site-packages/jose/jwk.py", line 10, in <module>
    from jose.backends.base import Key
  File "/volume1/homeassistant/deps/lib/python3.5/site-packages/jose/backends/__init__.py", line 3, in <module>
    from jose.backends.pycrypto_backend import RSAKey
  File "/volume1/homeassistant/deps/lib/python3.5/site-packages/jose/backends/pycrypto_backend.py", line 7, in <module>
    from Crypto.PublicKey import RSA
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/PublicKey/RSA.py", line 38, in <module>
    from Crypto.IO import PKCS8, PEM
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/IO/PKCS8.py", line 44, in <module>
    from Crypto.IO._PBES import PBES1, PBES2, PbesError
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/IO/_PBES.py", line 43, in <module>
    from Crypto.Hash import MD5, SHA1
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Hash/MD5.py", line 47, in <module>
    """)
  File "/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/_raw_api.py", line 258, in load_pycryptodome_raw_lib
    raise OSError("Cannot load native module '%s': %s" % (name, ", ".join(attempts)))
OSError: Cannot load native module 'Crypto.Hash._MD5': Trying '_MD5.cpython-35m-arm-linux-gnueabi.so': cannot load library '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.cpython-35m-arm-linux-gnueabi.so': /volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.cpython-35m-arm-linux-gnueabi.so: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.cpython-35m-arm-linux-gnueabi.so', Trying '_MD5.abi3.so': cannot load library '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.abi3.so': /volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.abi3.so: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.abi3.so', Trying '_MD5.so': cannot load library '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.so': /volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.so: cannot open shared object file: No such file or directory.  Additionally, ctypes.util.find_library() did not manage to locate a library called '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.so'

so…I’m currently stocking here…not sure what to do next to fix them…


#36

I also had a problem with pycryptodome.
Inside the wheel file (as generated by the spksrc toolchain), the cross-compiled binary files (*.so) had the wrong file name.
The synology was looking for somethink like _raw_ecb.cpython-35m-arm-linux-gnueabihf.so, but the binary was called _raw_ecb.cpython-35m-x86_64-linux-gnu.so. I guess the “x86_64” is taken by the toolchain from the host system rather than the target system.
Anyway, after I renamed all *.so files inside the wheel file with 7zip, and re-installed the wheel file on synology, it worked.

Check your error log, what exact file name the synology is looking for:
OSError: Cannot load native module 'Crypto.Hash._MD5': Trying '_MD5.cpython-35m-arm-linux-gnueabi.so': cannot load library '/volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.cpython-35m-arm-linux-gnueabi.so': /volume1/@appstore/python3/lib/python3.5/site-packages/Crypto/Util/../Hash/_MD5.cpython-35m-arm-linux-gnueabi.so: cannot open shared object file: No such file or directory.


#37

I see!!!
Thanks :slight_smile:
I’ll give it a try tonight!!!

and… have you tried the HomeKit function? did you manage to get it work?
Thank you~


#38

BIG Thanks @hogi1200 !!
Your method works for me~
Now I got the HA Cloud & HomeKit both working!!!

I replace all the " x86_64-linux-gnu" to " arm-linux-gnueabihf" in some wheel file (curve25519, ed25519, pycryptodome) and deleted the old one than install the new ones.

After that, both cloud and HomeKit is working for now!!!
Can’t thank you enough for your help ~~!!!


#39

I’m really glad for you guys. It’ll be really nice one of you to summ it up into one post and then I’ll try to make more detail orientated tutorial and to push it to the docs.


#40

@hogi1200 & @thy1225 Could I ask you that your python package is compatible with my DS214+ ? And if yes, how can I install it to my Synology? Thank you in advance.