1

I am trying to install python module Flask-Spyne on Windows and when I type pip install Flask-Spyne, on Sec-Wall collecting TypeError appear.

I am using Python 3.5.1 on Windows 10

This is it:

C:\Windows\system32>pip install flask-spyne
Collecting flask-spyne
Using cached Flask-Spyne-0.2.tar.gz

Collecting flask (from flask-spyne)
Using cached Flask-0.11.1-py2.py3-none-any.whl

Collecting spyne (from flask-spyne)
Using cached spyne-2.12.11.tar.gz

Collecting sec-wall (from flask-spyne)
Using cached sec-wall-1.2.tar.gz

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-mydzld6p\sec-wall\setup.py", line 30, in <module>
        packages = find_packages(b"src"),
      File "c:\program files (x86)\python35-32\lib\site-packages\setuptools\__init__.py", line 51, in find
        out = cls._find_packages_iter(convert_path(where))
      File "c:\program files (x86)\python35-32\lib\distutils\util.py", line 129, in convert_path
        paths = pathname.split('/')
    TypeError: a bytes-like object is required, not 'str'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SIVK~1\AppData\Local\Temp\pip-build-mydzld6p\sec-wall\

I tried solve python setup.py egg_info error, nothing. I tried to look at that TypeError, nothing.

Does someone know how to solve it? For any advice I am happy :)

PS: If it help, that when I type pip install suds, this appear:

C:\Windows\system32>pip install suds
Collecting suds
  Using cached suds-0.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\setup.py", line 20, in <module>
        import suds
      File "C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\suds\__init__.py", line 154, in <module>
        import client
    ImportError: No module named 'client'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\SIVK~1\AppData\Local\Temp\pip-build-l7jpgeg4\suds\

1 Answers1

1

According to Spyne's documentation, it's known to work with Python versions 2.6. and 2.7, but Python 3 support is not tested.

Also, the error you've got TypeError: a bytes-like object is required, not 'str' is what people often experience when migrating their code from python 2.7 to python 3.

I can reproduce your error when installing the package for python 3.5. And I got no errors when installing it for Python 2.7.

So, maybe you have to switch to Python 2.7, and/or report the problem to the package's developer.

vrs
  • 1,922
  • 16
  • 23
  • Oh, I read that, but something on this is strange... I instaled it once (Python 3.5.1) and it worked fine, that I reinstalled ntb and now, I cannot install it. Strange. But thank you, I will try python 2.7 – Michael Sivak Jun 13 '16 at 10:13
  • @MichaelSivak it seems that `sec-wall` package (which is a dependency for spyne) is screwed up. The package's website is not available, but you can get the code from github and try to fix it. Otherwise, I think, you really have no choice but use Python 2.7 – vrs Jun 13 '16 at 10:56
  • Yes, I already tried it with Python 2.7 and it is working well. Thank You. Hope that someone more experienced than me will fix that 'sec-wall'. But (for me) using Python 2.7 is good, because I had another problem with 'suds' and on 2.7 it is working well too. – Michael Sivak Jun 13 '16 at 11:14
  • @MichaelSivak glad that Python 2.7 worked! Then I think it's better if you mark my answer as accepted, so that other people know you've got a solution. – vrs Jun 13 '16 at 11:16
  • Good idea :) Thank You for your help – Michael Sivak Jun 13 '16 at 11:44
  • Spyne author here. sec-wall is not a Spyne dependency. – Burak Arslan Jun 14 '16 at 06:10
  • @BurakArslan, sorry, I've been misled by `Collecting sec-wall (from flask-spyne)` line – vrs Jun 14 '16 at 08:31
  • I was just clarifying, nothing to be sorry about. Spyne's XML parts work fine with Python 3. 2.13 targets full Python 3 compatibility. – Burak Arslan Jun 14 '16 at 09:38
  • @BurakArslan any ideas then, why do OP and me got the error while installing Spyne for Python 3.5? – vrs Jun 14 '16 at 10:35
  • You got the error wile installing flask-spyne not Spyne. – Burak Arslan Jun 14 '16 at 13:37