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

setup problem in Windows XP (netcdf3) #8

Closed
dopplershift opened this issue Feb 26, 2014 · 4 comments
Closed

setup problem in Windows XP (netcdf3) #8

dopplershift opened this issue Feb 26, 2014 · 4 comments

Comments

@dopplershift
Copy link
Member

From tomconno...@mailcan.com on September 26, 2008 20:31:16

What steps will reproduce the problem? - python setup-nc3.py install What is the expected output? What do you see instead? - Did not finish install, lengthy error output instead:
...
...
Found executable c:\mingw\bin\gcc.exe
Traceback (most recent call last):
File "setup-nc3.py", line 60, in
ext_modules = extensions)
File "C:\Python25\lib\site-packages\numpy-1.0.4.0002-py2.5
-win32.egg\numpy\distutils\core.py", line 176, in setup
return old_setup(**new_attr)
File "C:\Python25\lib\distutils\core.py", line 151, in set
up
dist.run_commands()
File "C:\Python25\lib\distutils\dist.py", line 974, in run
_commands
self.run_command(cmd)
File "C:\Python25\lib\distutils\dist.py", line 994, in run
command
cmd_obj.run()
File "C:\Python25\lib\site-packages\numpy-1.0.4.0002-py2.5
-win32.egg\numpy\distutils\command\install.py", line 16, in
run
r = old_install.run(self)
File "C:\Python25\lib\distutils\command\install.py", line
506, in run
self.run_command('build')
File "C:\Python25\lib\distutils\cmd.py", line 333, in run

command
self.distribution.run_command(command)
File "C:\Python25\lib\distutils\dist.py", line 994, in run
command
cmd_obj.run()
File "C:\Python25\lib\distutils\command\build.py", line 11
2, in run
self.run_command(cmd_name)
File "C:\Python25\lib\distutils\cmd.py", line 333, in run

command
self.distribution.run_command(command)
File "C:\Python25\lib\distutils\dist.py", line 994, in run
_command
cmd_obj.run()
File "C:\Python25\lib\site-packages\numpy-1.0.4.0002-py2.5
-win32.egg\numpy\distutils\command\build_ext.py", line 217,
in run
self.build_extensions()
File "C:\Python25\lib\distutils\command\build_ext.py", lin
e 416, in build_extensions
self.build_extension(ext)
File "C:\Python25\lib\site-packages\numpy-1.0.4.0002-py2.5
-win32.egg\numpy\distutils\command\build_ext.py", line 400,
in build_extension
build_temp=self.build_temp,**kws)
File "C:\Python25\lib\distutils\ccompiler.py", line 845, i
n link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File "C:\Python25\lib\site-packages\numpy-1.0.4.0002-py2.5
-win32.egg\numpy\distutils\mingw32ccompiler.py", line 153, i
n link
func(*args[:func.im_func.func_code.co_argcount])
File "C:\Python25\lib\distutils\unixccompiler.py", line 21
4, in link
libraries)
File "C:\Python25\lib\site-packages\numpy-1.0.4.0002-py2.5
-win32.egg\numpy\distutils\ccompiler.py", line 377, in gen_l
ib_options
runtime_library_dirs, libraries)
File "C:\Python25\lib\distutils\ccompiler.py", line 1242,
in gen_lib_options
opt = compiler.runtime_library_dir_option (dir)
File "C:\Python25\lib\distutils\unixccompiler.py", line 27
8, in runtime_library_dir_option
compiler = os.path.basename(sysconfig.get_config_var("CC
"))
File "C:\Python25\lib\ntpath.py", line 200, in basename
return split(p)[1]
File "C:\Python25\lib\ntpath.py", line 164, in split
d, p = splitdrive(p)
File "C:\Python25\lib\ntpath.py", line 119, in splitdrive
if p[1:2] == ':':
TypeError: 'NoneType' object is unsubscriptable What version of the product are you using? On what operating system? - version 0.7.6

  • Windows XP
  • Python 2.5 (numpy1.0.4 installed and working)
  • NetCDF 3.6.2 Please provide any additional information below. - NETCDF3_DIR environment variable is set
  • import scientific.IO.NetCDF does work
  • Cygwin (but not Cygwin Python) installed. It is not being used here, but
    it has created issues in the past.
  • Using this GCC binary: http://www.develer.com/oss/GccWinBinaries - The first line of output is a warning:
    C:\Python25\lib\distutils\dist.py:263: UserWarning: Unknown
    distribution option: 'summary'

Not sure where the problem might lie. Any suggestions would be appreciated!

Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=8

@dopplershift
Copy link
Member Author

From tomconno...@mailcan.com on October 01, 2008 15:27:53

Me again. I was able to successfully run the setup-nc3.py script by temporarily
replacing line 278 in distutils\unixcompiler.py:
compiler = os.path.basename(sysconfig.get_config_var("CC"))

with:
compiler = "gcc"

Not very elegant, but it seems to have worked. It looks like the configuration
variable "CC" had not yet been defined, so I specified it myself. I haven't come
across this problem setting up other packages, but I am new to Python so I can't say
if it is specific to this package or not.

@dopplershift
Copy link
Member Author

From off...@gmail.com on December 23, 2008 09:19:58

It's not specific to that python package. I tried to do the same thing with
pygraphviz and got the same error; your fix did the trick, so thanks!

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on December 23, 2008 09:45:34

I think you could also do

"python setup.py build --compiler=mingw32" if you have the mingw gcc compiler.

-Jeff

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on May 25, 2009 06:01:49

Status: Invalid

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

No branches or pull requests

1 participant