1

I am attempting to build pygraphviz on windows 7 but have problems,see Traceback 1 below. At the moment I am considering changing to the mingw gcc compile. But have also seen that the compiler used should be the same as used in my distribution - Python(x,y).

I'm aware of the pain others have had with this issue. But can't seem to find my exact problem.

I did have, and can easily get, a working version from Christoph Gohlke's Unofficial Windows Binaries for Python Extension Packages. The reason I am attempting a build is that I think it might be a reason that I was getting the problem described here (I'm aware that I might be clutching at straws here and would welcome being put straight on this possible folly).

What debugging step should I next take?


Note. I previously updated the msvc9compiler.py file to the below (to fix this problem - see traceback 2):

def library_dir_option(self, dir): # FIXED VERSION
    if ' ' in dir and not dir.startswith('"'):
        dir = '"%s"' % dir
    return "/LIBPATH:" + dir

Traceback 1:

python setup.py install
running install
include_dirs=None
library_dirs=None
running build
running build_py
running egg_info
writing pygraphviz.egg-info\PKG-INFO
writing top-level names to pygraphviz.egg-info\top_level.txt
writing dependency_links to pygraphviz.egg-info\dependency_links.txt
reading manifest file 'pygraphviz.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
running build_ext
building 'pygraphviz._graphviz' extension
C:\Python27\lib\site-packages\setuptools\dist.py:285: UserWarning: Normalizing '1.4.dev' to '1.4.dev0'
  normalized_version,
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc\build'
Traceback (most recent call last):
  File "setup.py", line 93, in <module>
    tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\Lib\site-packages\pygraphviz-master\setup_commands.py", line 50, in modified_run
    orig_run(self)
  File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 65, in run
    orig.install.run(self)
  File "C:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
    _build_ext.run(self)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in build_extensions
    self.build_extension(ext)
  File "C:\Python27\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
    _build_ext.build_extension(self, ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 496, in build_extension
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 473, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 396, in initialize
    self.cc = self.find_exe("cl.exe")
AttributeError: MSVCCompiler instance has no attribute 'find_exe'

Traceback 2:

python setup.py install
running install
include_dirs=None
library_dirs=None
running build
running build_py
running egg_info
writing pygraphviz.egg-info\PKG-INFO
writing top-level names to pygraphviz.egg-info\top_level.txt
writing dependency_links to pygraphviz.egg-info\dependency_links.txt
reading manifest file 'pygraphviz.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
running build_ext
building 'pygraphviz._graphviz' extension
C:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:/Program Files (x86)/Graphviz2.38/include" -INone -IC:\Python27\include -IC:\Python27\PC /Tcpygraphviz/graphviz_wrap.c /Fobuild\temp.win32-2.7\Release\pygraphviz/graphviz_wrap.obj
graphviz_wrap.c
pygraphviz/graphviz_wrap.c(3354) : warning C4047: 'return' : 'int' differs in levels of indirection from 'Agsym_t *'
pygraphviz/graphviz_wrap.c(3440) : warning C4101: 'mode_byte_obj1' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3439) : warning C4101: 'mode_obj1' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3441) : warning C4101: 'mode1' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3438) : warning C4101: 'fd1' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3512) : warning C4101: 'mode2' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3510) : warning C4101: 'mode_obj2' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3509) : warning C4101: 'fd2' : unreferenced local variable
pygraphviz/graphviz_wrap.c(3511) : warning C4101: 'mode_byte_obj2' : unreferenced local variable
C:\Python27\lib\site-packages\setuptools\dist.py:285: UserWarning: Normalizing '1.4.dev' to '1.4.dev0'
  normalized_version,
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.svn' found anywhere in distribution
no previously-included directories found matching 'doc\build'
Traceback (most recent call last):
  File "setup.py", line 93, in <module>
    tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
  File "C:\Python27\lib\distutils\core.py", line 151, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\Lib\site-packages\pygraphviz-master\setup_commands.py", line 50, in modified_run
    orig_run(self)
  File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 65, in run
    orig.install.run(self)
  File "C:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\site-packages\setuptools\command\build_ext.py", line 49, in run
    _build_ext.run(self)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 337, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 446, in build_extensions
    self.build_extension(ext)
  File "C:\Python27\lib\site-packages\setuptools\command\build_ext.py", line 174, in build_extension
    _build_ext.build_extension(self, ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 528, in build_extension
    target_lang=language)
  File "C:\Python27\lib\distutils\ccompiler.py", line 691, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 606, in link
    libraries)
  File "C:\Python27\lib\distutils\ccompiler.py", line 1068, in gen_lib_options
    lib_opts.append(compiler.library_dir_option(dir))
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 753, in library_dir_option
    return "/LIBPATH:" + dir
TypeError: cannot concatenate 'str' and 'NoneType' objects
Community
  • 1
  • 1
Lee
  • 29,398
  • 28
  • 117
  • 170

0 Answers0