etesync / etesync-dav

This is a CalDAV and CardDAV adapter for EteSync
https://www.etesync.com
GNU General Public License v3.0
290 stars 47 forks source link

etesync-dav fails to build on Linux Mint #15

Closed lord-aerion closed 6 years ago

lord-aerion commented 6 years ago

Hi,

I've successfully installed etesync-dav on Arch Linux, but I'm having trouble getting it installed on Linux Mint 18.3.

I get the following error when running pip install etesync-dav

Collecting etesync-dav
  Using cached etesync-dav-0.1.5.tar.gz
Collecting appdirs>=1.4.3 (from etesync-dav)
  Using cached appdirs-1.4.3-py2.py3-none-any.whl
Collecting radicale_storage_etesync>=0.1.4 (from etesync-dav)
  Using cached radicale_storage_etesync-0.1.4.tar.gz
Collecting etesync>=0.5.1 (from radicale_storage_etesync>=0.1.4->etesync-dav)
  Using cached etesync-0.5.2.tar.gz
Collecting Radicale>=2.0.0 (from radicale_storage_etesync>=0.1.4->etesync-dav)
  Using cached Radicale-2.1.8.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-0cVpLV/Radicale/setup.py", line 48, in <module>
        with open(init_path, "r", encoding="utf-8") as fd:
    TypeError: 'encoding' is an invalid keyword argument for this function

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-0cVpLV/Radicale/

Any ideas?

Please let me know if you need further information from me.

Kind regards, Emile

tasn commented 6 years ago

Radicale and etesync are Python 3 only. It looks like you're using python2. If that's the case. Please use python3 and close this.

Thanks!

lord-aerion commented 6 years ago

Both python2 and python3 are installed.

tasn commented 6 years ago

Run "python3 setup.py" ?

lord-aerion commented 6 years ago

Do you mean downloading the zip from GitHub and installing that, instead of trying to install it using pip?

tasn commented 6 years ago

Ah, I thought you were trying to install from pip. If you are installing from pip, use pip3 rather than pip.

lord-aerion commented 6 years ago

I was indeed trying to install from pip. As you can probably tell, I'm not very familiar with python. I'm an admin person, not a developer, so please excuse my ignorance! :-)

After installing and using pip3 I do indeed get a lot further, however running sudo pip3 install etesync-dav now fails with a different error:

Running setup.py install for scrypt ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wv87thjf/scrypt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3374ydbx-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/scrypt
    copying scrypt/scrypt.py -> build/lib.linux-x86_64-3.5/scrypt
    copying scrypt/__init__.py -> build/lib.linux-x86_64-3.5/scrypt
    running build_ext
    building '_scrypt' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/src
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/lib
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/lib/crypto
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/lib/scryptenc
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/lib/util
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/libcperciva
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/libcperciva/alg
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/libcperciva/crypto
    creating build/temp.linux-x86_64-3.5/scrypt-1.2.1/libcperciva/util
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_CONFIG_H -DHAVE_CLOCK_GETTIME=1 -DHAVE_LIBRT=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_STRUCT_SYSINFO=1 -DHAVE_STRUCT_SYSINFO_MEM_UNIT=1 -DHAVE_STRUCT_SYSINFO_TOTALRAM=1 -DHAVE_SYSINFO=1 -DHAVE_SYS_SYSINFO_H=1 -D_FILE_OFFSET_BITS=64 -Iscrypt-1.2.1 -Iscrypt-1.2.1/lib -Iscrypt-1.2.1/lib/scryptenc -Iscrypt-1.2.1/lib/crypto -Iscrypt-1.2.1/lib/util -Iscrypt-1.2.1/libcperciva/cpusupport -Iscrypt-1.2.1/libcperciva/alg -Iscrypt-1.2.1/libcperciva/util -Iscrypt-1.2.1/libcperciva/crypto -I/usr/local/include -I/usr/include -I/usr/include/python3.5m -c src/scrypt.c -o build/temp.linux-x86_64-3.5/src/scrypt.o -O2
    src/scrypt.c:28:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-wv87thjf/scrypt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-3374ydbx-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wv87thjf/scrypt/

Due to my lack of knowledge of Python I've not been able to follow the recommendation to install etesync-dav in a python virtualenv.

tasn commented 6 years ago

It looks like you need to install python3-dev or some sort of a package like this. I don't really know how it is on mint.

lord-aerion commented 6 years ago

That was indeed the correct package. I also needed libssl-dev. I've now successfully installed it.

Thank you for your time and effort!

tasn commented 6 years ago

Pleasure. Could you please open a PR against the readme with instructions for mint, or alternatively let me know the list of packages you used so I can add it myself?

Thanks.