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

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

Open
swiatecki opened this issue May 3, 2024 · 0 comments
Open

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

swiatecki opened this issue May 3, 2024 · 0 comments

Comments

@swiatecki
Copy link

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'

``

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

No branches or pull requests

1 participant