ModuleNotFoundError: No module named 'netifaces'

Bug #1896354 reported by RSA Anon
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Netplan
Invalid
Undecided
Unassigned

Bug Description

Install netplan on Manjaro 20 via snap. Install suceeds; however, post netplan installation the /etc/netplan directory does not exist. Also running netplan generate commands causes the following error:

Traceback (most recent call last):
  File "/snap/netplan/224/usr/sbin/netplan", line 23, in <module>
    netplan.main()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/core.py", line 42, in main
    self.parse_args()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/core.py", line 35, in parse_args
    import netplan.cli.commands
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/commands/__init__.py", line 18, in <module>
    from netplan.cli.commands.apply import NetplanApply
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/commands/apply.py", line 29, in <module>
    import netifaces
ModuleNotFoundError: No module named 'netifaces'

Revision history for this message
Ricardo Abreu (ricab) wrote :

I got the same thing on Fedora. I managed to get past it by installing `python3-netifaces` there, but then run into another issue:

Traceback (most recent call last):
  File "/snap/netplan/224/usr/sbin/netplan", line 23, in <module>
    netplan.main()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/core.py", line 50, in main
    self.run_command()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
    self.func()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/commands/try_command.py", line 66, in run
    self.run_command()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/utils.py", line 130, in run_command
    self.func()
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/commands/try_command.py", line 69, in command_try
    if not self.is_revertable():
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/cli/commands/try_command.py", line 152, in is_revertable
    self.config_manager.parse(extra_config=extra_config)
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/configmanager.py", line 111, in parse
    self._merge_yaml_config(yaml_file)
  File "/var/lib/snapd/snap/netplan/224/usr/share/netplan/netplan/configmanager.py", line 196, in _merge_yaml_config
    yaml_data = yaml.load(f, Loader=yaml.CSafeLoader)
AttributeError: module 'yaml' has no attribute 'CSafeLoader'

This despite:

$ python3
Python 3.9.1 (default, Jan 20 2021, 00:00:00)
[GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.CSafeLoader
<class 'yaml.cyaml.CSafeLoader'>

Revision history for this message
Lukas Märdian (slyon) wrote :

Hey, there is currently no officially supported netplan snap available. The one at https://snapcraft.io/netplan is 5 versions and almost 2 years behind and looks pretty unmaintained.

Revision history for this message
Lukas Märdian (slyon) wrote :

I am marking this bug "Invalid" as there are currently no plans to provide an officially maintained snap of netplan. If you really need a supported netplan snap, please re-open this as a feature request about providing an official netplan snap.
Thanks!

Changed in netplan:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.