wting / python-graph

Automatically exported from code.google.com/p/python-graph
Other
5 stars 4 forks source link

Installation using setup.py does not work in Python 3 #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I try to install any of two modules (core, dot) in pygraph, I got an error 
"SyntaxError: invalid syntax". It seems to be a problem with different syntax 
in Python version 2.x and 3.x. There are also problems with usage of print as a 
keyword, usage of obsolete setuptools and importing urllib2.

What steps will reproduce the problem?
1. Unpack the distribution package and change directory to 
'python-graph-1.8.0/core'
2. Run command: setup.py install
3. The same problem is also in module 'dot'

What is the expected output? What do you see instead?
I get an error message
E:\tmp\python-graph-1.8.0\core>setup.py install
Traceback (most recent call last):
  File "E:\tmp\python-graph-1.8.0\core\setup.py", line 7, in <module>
    from setuptools import setup, find_packages
ImportError: No module named setuptools

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\tmp\python-graph-1.8.0\core\setup.py", line 9, in <module>
    import ez_setup
  File "E:\tmp\python-graph-1.8.0\core\ez_setup\__init__.py", line 106
    except pkg_resources.VersionConflict, e:
                                        ^
SyntaxError: invalid syntax

What version of the product are you using? On what operating system?
Windows XP, Python 3.2.1, python-graph 1.8.0

Original issue reported on code.google.com by peni...@gmail.com on 13 Oct 2011 at 7:49

GoogleCodeExporter commented 9 years ago
Hello, are you able to install if you remove the ez_setup directory inside core?

Also, you won't be able to use dot with Python 3 as it requires pydot (which is 
still Python2-only, AFAIK).

Original comment by pmatiello on 13 Nov 2011 at 12:00

GoogleCodeExporter commented 9 years ago
Hello, 
   I am not able to install the package core wihout the directory ez_setup. The reason is apparent from the source code of the file setup.py. 
It seems tat setuptools are available only for Python up to 2.7, so ez_setup is 
imported in setup.py.

By the way, pydot has a branch for Python 3.x, so the situation is not so 
hopeless.

Cheers,
   Tomas

Original comment by peni...@gmail.com on 22 Nov 2011 at 9:50

GoogleCodeExporter commented 9 years ago
I played a bit here and managed to install python-graph-core on Python 3.2.2 
without issues. I believe that you are lacking Distribute in your Python3 
installation.

http://pypi.python.org/pypi/distribute

Please install Distribute and then try to install python-graph-core again. Let 
me know if this works out for you.

Original comment by pmatiello on 23 Nov 2011 at 12:45

GoogleCodeExporter commented 9 years ago

Original comment by pmatiello on 31 Dec 2011 at 12:30