Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation error (Python 3) #4

Open
microamp opened this issue Sep 13, 2014 · 2 comments
Open

Installation error (Python 3) #4

microamp opened this issue Sep 13, 2014 · 2 comments

Comments

@microamp
Copy link

Hello.

It's likely that it's not supported in Python 3, but...

[microamp@arch ~]$ pip --version
pip 1.5.6 from /usr/lib/python3.4/site-packages (python 3.4)
[microamp@arch ~]$ sudo pip install doga
Downloading/unpacking doga
  Downloading Doga-0.2.0.tar.gz
  Running setup.py (path:/tmp/pip_build_root/doga/setup.py) egg_info for package doga

Requirement already satisfied (use --upgrade to upgrade): npyscreen>=4.4.1 in /usr/lib/python3.4/site-packages (from doga)
Installing collected packages: doga
  Running setup.py install for doga
      File "/usr/lib/python3.4/site-packages/Doga/interfaces/sockets.py", line 52
        except socket.error, msg:
                           ^
    SyntaxError: invalid syntax


    Installing doga script to /usr/bin
Successfully installed doga
Cleaning up...

It says "Successfully installed doga" despite of the syntax error above. When I reinstall it, I get the following output.

[microamp@arch ~]$ sudo pip install doga
Requirement already satisfied (use --upgrade to upgrade): doga in /usr/lib/python3.4/site-packages
Requirement already satisfied (use --upgrade to upgrade): npyscreen>=4.4.1 in /usr/lib/python3.4/site-packages (from doga)
Cleaning up...

I get the same syntax error when I attempt to run it.

[microamp@arch ~]$ sudo doga
Traceback (most recent call last):
  File "/usr/bin/doga", line 9, in <module>
    load_entry_point('Doga==0.2.0', 'console_scripts', 'doga')()
  File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 356, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2472, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 2186, in load
    ['__name__'])
  File "/usr/lib/python3.4/site-packages/Doga/__init__.py", line 2, in <module>
    from .interfaces.sockets import SocketInterface
  File "/usr/lib/python3.4/site-packages/Doga/interfaces/sockets.py", line 52
    except socket.error, msg:
                       ^
SyntaxError: invalid syntax

I had a brief look at the 'setup.py', but there are no Python versions supported specified in there?

@pravj
Copy link
Owner

pravj commented Sep 13, 2014

Hey @microamp,

looks like the error is related to socket library functions in python3.
see here, it is unable to create a raw socket.

actually I never tried python3 on myself, so didn't wrote Doga keeping python3 in mind.

I'll try to find a fix for this and version compatibility.
you are free to help for it and work on this fix.

@microamp
Copy link
Author

@pravj,

I think it's good to have versions supported specified in 'setup.py' for the time being, and some form of version restriction in there too. See this for instance.

I'll see if it's trivial to make it compatible with Python 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants