Skip to content

Pip install doesn't work due to latest lxml on MacOS  #113

Description

@swiatecki

Something breaks in lxml when running installing via pip.

Workaround:

  • remove lxml,
  • Install lxml 4.9.4 pip install lxml==4.9.4

Issue appears to be the same as here https://stackoverflow.com/questions/75442675/lxml-fails-to-import-with-error-symbol-not-found-in-flat-namespace-xsltdocde

Output that shows error:

``
(yangsuitevenv) nswiatec@NSWIATEC-M-P74T code % yangsuite
ERROR:root:Error in loading YANG Suite app "yangsuite-netconf": dlopen(/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'
ERROR:root:Error in loading YANG Suite app "yangsuite-yangtree": dlopen(/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'
Traceback (most recent call last):
File "/Users/nswiatec/code/yangsuitevenv/bin/yangsuite", line 8, in
sys.exit(main())
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/yangsuite/application.py", line 268, in main
execute_from_command_line(['manage', 'migrate', '--no-color'])
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 100, in handle
self.check(databases=[database])
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/management/base.py", line 485, in check
all_issues = checks.run_checks(
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/checks/urls.py", line 14, in check_url_config
return check_resolver(resolver)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/core/checks/urls.py", line 24, in check_resolver
return check_method()
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 494, in check
for pattern in self.url_patterns:
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 715, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/utils/functional.py", line 57, in get
res = instance.dict[self.name] = self.func(instance)
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/urls/resolvers.py", line 708, in urlconf_module
return import_module(self.urlconf_name)
File "/Users/nswiatec/.pyenv/versions/3.8.19/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/yangsuite/urls.py", line 106, in
include(ac.name + '.urls')))
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/django/urls/conf.py", line 38, in include
urlconf_module = import_module(urlconf_module)
File "/Users/nswiatec/.pyenv/versions/3.8.19/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/ysdevices/urls.py", line 3, in
from . import views
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/ysdevices/views.py", line 11, in
from ysnetconf.nconf import SessionKey
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/ysnetconf/init.py", line 7, in
from .nconf import (
File "/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/ysnetconf/nconf.py", line 15, in
import lxml.etree as et
ImportError: dlopen(/Users/nswiatec/code/yangsuitevenv/lib/python3.8/site-packages/lxml/etree.cpython-38-darwin.so, 0x0002): symbol not found in flat namespace '_exsltDateXpathCtxtRegister'

``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions