Thank you for your response. I do have both traits and pyxml
installed according to the enstaller from enthought. But, the test
you gave me to do fails. It seems that, for some reason, Python is
not seeing the enthought eggs that are installed in
D:\Python25\Lib\site-packages. Each egg is installed in its own
directory (i.e. traits is installed in
D:\Python25\Lib\site-packages\enthought.traits-2.0.1b1-py2.5-win32.egg,
which as an "EGG-INFO" and an "enthought\traits" directory. The
"enthought" directory has the "__init__.py" and related files in it.)
While this is really an enthought question and not an UrbanSim
question, does anyone know what's going on? I imported the sys module
and looked at sys.path and all of the directories show up. However,
the path stopped at *.egg and did not include the "enthought"
directory that holds the "__init__.py" file. Does this mean that the
paths are wrong? Or am I missing something obvious?
Jim
On Jan 8, 2008 4:08 AM, Liming Wang <lmwang_at_u.washington.edu> wrote:
> James,
>
> Your problem seems to be caused by missing/un-working traits API. After you
> correctly installed traits, you should be able to run this in a python
> shell:
>
> from enthought.traits.api import View, Group, Item
>
> Your unittest log also suggests that you're missing pyxml module, which has
> been documented here:
> http://www.urbansim.org/pipermail/users/2007-November/0020.html
>
> Hope this helps,
> Liming.
>
>
>
> On Jan 4, 2008 8:21 AM, James Palma <jpalma32_at_gmail.com> wrote:
> >
> >
> >
> > I am trying to install UrbanSim on a Windows XP machine. I downloaded
> > python-2.5.1.msi from http://www.python.org/download/releases/2.5.1/
> > and installed it. I then installed all of the required and
> > recommended packages listed on
> > http://www.urbansim.org/docs/installation/python_packages.html except
> > for the MySQL packages. I did not install Rpy, but I did install
> > dbfpy. Even though the directions did not mention it, I did install
> > wxPython-2.8.4.0.0008-py2.5-win32.egg from the
> > http://code.enthought.com/enstaller/eggs/windows/xp/ repository
> > because it seemed that the Enthought Traits UI depended on it. I
> > installed the latest version of each package for Python 2.5. All
> > files were installed on D: as that is my working drive
> >
> > I installed the full Opus set of files, first through the ZIP file and
> > then through Subversion when that didn't seem to work. The files were
> > installed in D:\opusworkspace.
> >
> > I then set the PYTHONPATH, first in the registry, and then in the
> > environment variables when that didn't seem to work. The PYTHONPATH
> > is
> D:\Python25\Lib;D:\Python25\DLLs;D:\Python25\Lib\lib-tk;D:\opusworkspace
> >
> > My problem is that most of the tests listed in
> > http://www.urbansim.org/docs/installation/test_install.html do not
> > work. When I type "import opus_core.opus_package_info" and "import
> > urbansim.opus_package_info", I get no output. No errors, no notations
> > as listed in the directions about "Required Opus packages for
> > opus_core: []" and associated output. Nothing.
> >
> >
> > When I run the "python test_sampling_toolbox.py" that seems to work:
> > ---------------------------
> > D:\opusworkspace\opus_core\tests>python test_sampling_toolbox.py
> > prob2dsample (50, 10) items array in 0.0469999313354 sec
> > .probsample_noreplace 50 from 200 items array in 0.0 sec
> > .probsample_replace 50 from 200 items array in 0.0 sec
> > .sample_choice from (3, 4) items array in 0.0 sec
> > .sample_noreplace 50 from 200 items array in 0.0 sec
> > .sample_replace 50 from 200 items array in 0.0 sec
> > ..
> > ----------------------------------------------------------------------
> > Ran 7 tests in 0.094s
> >
> > OK
> > ----------------------------
> >
> > But, when I run python C:\opusworkspace\opus_core\tests\all_tests.py,
> > I get lots of error mesasges. I have reproduced them at the end of
> > this e-mail.
> >
> > When I try to run the Eugene simulation described on
> >
> http://www.urbansim.org/opus/releases/opus-4-1-1/docs/tutorials/run-eugene-model/node3.html
> ,
> > I get this:
> >
> > D:\opusworkspace\eugene\tools>python run_simulation_on_baseyear_cache.py
> > Traceback (most recent call last):
> > File "run_simulation_on_baseyear_cache.py", line 21, in <module>
> > from enthought.traits.api import View, Group, Item
> > ImportError: cannot import name View
> >
> >
> > I've hit the end of my abilities here. Any one have any idea what's going
> on?
> >
> > Jim
> >
> >
> >
> >
> > All Tests Output:
> >
> > D:\opusworkspace\opus_core\tests>python all_tests.py
> > ERROR: Could not import opus_core.opus_gdal!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File "D:\opusworkspace\opus_core\opus_gdal.py", line 17, in <module>
> > import Numeric as numeric
> > ImportError: No module named Numeric
> > ERROR: Could not import opus_core.table_type_schema!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File "D:\opusworkspace\opus_core\table_type_schema.py", line 22, in
> <module>
> > from xml import xpath
> > ImportError: cannot import name xpath
> > ERROR: Could not import
> opus_core.indicator_framework.image_types.arcgeotiff_map
> > !
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > ERROR: Could not import
> opus_core.indicator_framework.image_types.dataset_table!
> >
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > ERROR: Could not import
> opus_core.indicator_framework.image_types.geotiff_map!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > ERROR: Could not import
> opus_core.indicator_framework.image_types.matplotlib_cha
> > rt!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > ERROR: Could not import
> opus_core.indicator_framework.image_types.matplotlib_lor
> > enzcurve!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > ERROR: Could not import
> opus_core.indicator_framework.image_types.matplotlib_map
> > !
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > ERROR: Could not import opus_core.indicator_framework.image_types.table!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\__init__.py",
> > line 18, in <module>
> > from opus_core.indicator_framework.image_types.geotiff_map import
> GeotiffMap
> >
> > File
> "D:\opusworkspace\opus_core\indicator_framework\image_types\geotiff_map.p
> > y", line 19, in <module>
> > raise ImportError, 'failed to import OpusGDAL from opus_core.opus_gdal'
> > ImportError: failed to import OpusGDAL from opus_core.opus_gdal
> > WARNING: Could not load traits.ui. Skipping
> D:\opusworkspace\opus_core\indicator
> > _framework\traits\traits_abstract_indicator.pyc!
> > WARNING: Could not load traits.ui. Skipping
> D:\opusworkspace\opus_core\indicator
> > _framework\traits\__init__.pyc!
> > WARNING: Could not load traits.ui. Skipping
> D:\opusworkspace\opus_core\indicator
> > _framework\traits\traits_image_types\traits_map.pyc!
> > ERROR: Could not import
> opus_core.indicator_framework.traits.traits_image_types.
> > traits_chart!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\traits\traits_image_types
> > \__init__.py", line 15, in <module>
> > from opus_core.indicator_framework.traits.traits_image_types.traits_map
> impo
> > rt TraitsMap
> > ImportError: cannot import name TraitsMap
> > ERROR: Could not import
> opus_core.indicator_framework.traits.traits_image_types.
> > traits_map!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\traits\traits_image_types
> > \__init__.py", line 15, in <module>
> > from opus_core.indicator_framework.traits.traits_image_types.traits_map
> impo
> > rt TraitsMap
> > ImportError: cannot import name TraitsMap
> > ERROR: Could not import
> opus_core.indicator_framework.traits.traits_image_types.
> > traits_table!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File
> "D:\opusworkspace\opus_core\indicator_framework\traits\traits_image_types
> > \__init__.py", line 15, in <module>
> > from opus_core.indicator_framework.traits.traits_image_types.traits_map
> impo
> > rt TraitsMap
> > ImportError: cannot import name TraitsMap
> > ERROR: Could not import opus_core.services.run_server.available_runs!
> > Traceback (most recent call last):
> > File "D:\opusworkspace\opus_core\tests\utils\test_scanner.py", line 49,
> in fin
> > d_opus_test_cases_for_package
> > exec('import %s' % module_name)
> > File "<string>", line 1, in <module>
> > File "D:\opusworkspace\opus_core\services\run_server\available_runs.py",
> line
> > 17, in <module>
> > from opus_core.table_type_schema import TableTypeSchema
> > File "D:\opusworkspace\opus_core\table_type_schema.py", line 22, in
> <module>
> > from xml import xpath
> > ImportError: cannot import name xpath
> > WARNING: The tests will not be run for module:
> > opus_core.store.old.mysql_storage
> > since the MYSQLHOSTNAMEFORTESTS environment variable has
> > not been defined. See documentation for how to define
> > a connection to a database server for tests.
> > WARNING: Tests for mysql_storage skipped because the MySQLdb module could
> not be
> > loaded.
> > WARNING: The tests will not be run for module:
> > D:\opusworkspace\opus_core\tests\test_create_services_database.pyc
> > since the MYSQLHOSTNAMEFORTESTS environment variable has
> > not been defined. See documentation for how to define
> > a connection to a database server for tests.
> >
> >
> >
> ================================================================================
> >
> > Traceback (most recent call last):
> > File "all_tests.py", line 17, in <module>
> > PackageTester().run_all_tests_for_package('opus_core')
> > File "D:\opusworkspace\opus_core\tests\utils\package_tester.py", line 41,
> in r
> > un_all_tests_for_package
> > opus_unittest.main(testRunner=OpusTestRunner(package))
> > File "D:\Python25\lib\unittest.py", line 768, in __init__
> > self.runTests()
> > File "D:\Python25\lib\unittest.py", line 805, in runTests
> > result = self.testRunner.run(self.test)
> > File "D:\opusworkspace\opus_core\tests\utils\opus_test_runner.py", line
> 134, i
> > n run
> > test(result)
> > File "D:\Python25\lib\unittest.py", line 437, in __call__
> > return self.run(*args, **kwds)
> > File "D:\Python25\lib\unittest.py", line 433, in run
> > test(result)
> > File "D:\Python25\lib\unittest.py", line 437, in __call__
> > return self.run(*args, **kwds)
> > File "D:\Python25\lib\unittest.py", line 433, in run
> > test(result)
> > File "D:\Python25\lib\unittest.py", line 281, in __call__
> > return self.run(*args, **kwds)
> > File "D:\Python25\lib\unittest.py", line 247, in run
> > result.startTest(self)
> > File "D:\opusworkspace\opus_core\tests\utils\opus_test_runner.py", line
> 68, in
> > startTest
> > methodName =
> logger._do_hide_error_and_warning_words(test._TestCase__testMet
> > hodName)
> > AttributeError: 'TestExogenousAttributes' object has no attribute
> '_TestCase__te
> > stMethodName'
> > _______________________________________________
> > Users mailing list
> > Users_at_urbansim.org
> > http://www.urbansim.org/mailman/listinfo/users
> >
>
>
Received on Tue Jan 08 2008 - 07:41:17 PST
This archive was generated by hypermail 2.2.0 : Tue Jan 08 2008 - 07:41:18 PST