Asciinema: fails after brew installation: ModuleNotFoundError: No module named 'pkg_resources'

Created on 12 Feb 2018  ·  10Comments  ·  Source: asciinema/asciinema

$ brew install asciinema
Warning: asciinema 2.0.0 is already installed

$ asciinema 
Traceback (most recent call last):
  File "/usr/local/Cellar/asciinema/2.0.0/libexec/bin/asciinema", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

Traceback (most recent call last):
  File "/usr/local/Cellar/asciinema/2.0.0/libexec/bin/asciinema", line 6, in <module>
    from pkg_resources import load_entry_point
ModuleNotFoundError: No module named 'pkg_resources'

This isn't an asciinema problem but an issue with my installation - I'm probably lacking some important requirements.

I am investigating this and will add notes for how to solve it.

Most helpful comment

The fixes for me were:

 # to find and fix issues with my brew
$ brew doctor

$ brew install python3
Warning: python3 3.6.4_2 is already installed, it's just not linked.
You can use `brew link python3` to link this version.

$ brew link python3
Linking /usr/local/Cellar/python3/3.6.4_2... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

# It's possible that the linking would not be necessary if I skipped to the postinstall step.
$ sudo mkdir /usr/local/Frameworks
$ sudo chown $(whoami):admin /usr/local/Frameworks
$ brew link python3
Linking /usr/local/Cellar/python3/3.6.4_2... 1 symlinks created

At this point, it would still not work. So I ran:

$ brew postinstall python3

And then asciinema worked!

All 10 comments

The fixes for me were:

 # to find and fix issues with my brew
$ brew doctor

$ brew install python3
Warning: python3 3.6.4_2 is already installed, it's just not linked.
You can use `brew link python3` to link this version.

$ brew link python3
Linking /usr/local/Cellar/python3/3.6.4_2... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

# It's possible that the linking would not be necessary if I skipped to the postinstall step.
$ sudo mkdir /usr/local/Frameworks
$ sudo chown $(whoami):admin /usr/local/Frameworks
$ brew link python3
Linking /usr/local/Cellar/python3/3.6.4_2... 1 symlinks created

At this point, it would still not work. So I ran:

$ brew postinstall python3

And then asciinema worked!

The brew post install python3 resolved it for me. However, when trying to save a .cast locally (asciinema rec filename.cast), I am still getting some permissions issues. However, using the post recording ctrl-c does save ir properly.

This is clearly packaging / homebrew issue. In the future please report these kind of issue to brew package maintainer(s) in brew formulas repository. Thanks!

This helped me as well. Thank you!

Thank you!

This works for me!

That works for me! Thank you!!

the same error
thanks, it worked!

That helped a lot, thanks mate.

Perfect !
This works for me , Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omaraboumrad picture omaraboumrad  ·  10Comments

redaxmedia picture redaxmedia  ·  3Comments

bashfulrobot picture bashfulrobot  ·  11Comments

KurtPfeifle picture KurtPfeifle  ·  3Comments

Edo78 picture Edo78  ·  5Comments