[GH-ISSUE #260] fails after brew installation: ModuleNotFoundError: No module named 'pkg_resources' #185

Closed
opened 2026-02-25 20:32:59 +03:00 by kerem · 10 comments
Owner

Originally created by @nictuku on GitHub (Feb 12, 2018).
Original GitHub issue: https://github.com/asciinema/asciinema/issues/260

$ 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.

Originally created by @nictuku on GitHub (Feb 12, 2018). Original GitHub issue: https://github.com/asciinema/asciinema/issues/260 ``` $ 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.
kerem closed this issue 2026-02-25 20:32:59 +03:00
Author
Owner

@nictuku commented on GitHub (Feb 12, 2018):

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!

<!-- gh-comment-id:365066686 --> @nictuku commented on GitHub (Feb 12, 2018): 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!
Author
Owner

@VirtualFreak commented on GitHub (Mar 21, 2018):

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.

<!-- gh-comment-id:374989772 --> @VirtualFreak commented on GitHub (Mar 21, 2018): 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.
Author
Owner

@ku1ik commented on GitHub (Mar 22, 2018):

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!

<!-- gh-comment-id:375208207 --> @ku1ik commented on GitHub (Mar 22, 2018): 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!
Author
Owner

@arunsathiya commented on GitHub (Aug 12, 2018):

This helped me as well. Thank you!

<!-- gh-comment-id:412318718 --> @arunsathiya commented on GitHub (Aug 12, 2018): This helped me as well. Thank you!
Author
Owner

@wanshaoyuan commented on GitHub (Nov 17, 2018):

Thank you!

<!-- gh-comment-id:439619822 --> @wanshaoyuan commented on GitHub (Nov 17, 2018): Thank you!
Author
Owner

@aristofanio commented on GitHub (Jan 5, 2019):

This works for me!

<!-- gh-comment-id:451615612 --> @aristofanio commented on GitHub (Jan 5, 2019): This works for me!
Author
Owner

@lbrabus commented on GitHub (Mar 14, 2019):

That works for me! Thank you!!

<!-- gh-comment-id:473086130 --> @lbrabus commented on GitHub (Mar 14, 2019): That works for me! Thank you!!
Author
Owner

@aa1143 commented on GitHub (Mar 28, 2019):

the same error
thanks, it worked!

<!-- gh-comment-id:477503595 --> @aa1143 commented on GitHub (Mar 28, 2019): the same error thanks, it worked!
Author
Owner

@qn7o commented on GitHub (Apr 5, 2019):

That helped a lot, thanks mate.

<!-- gh-comment-id:480287835 --> @qn7o commented on GitHub (Apr 5, 2019): That helped a lot, thanks mate.
Author
Owner

@spchef commented on GitHub (Jun 12, 2019):

Perfect !
This works for me , Thank you

<!-- gh-comment-id:501124527 --> @spchef commented on GitHub (Jun 12, 2019): Perfect ! This works for me , Thank you
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asciinema#185
No description provided.