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

Import error despite having imported all dependencies #8

Open
ghost opened this issue Apr 27, 2021 · 9 comments
Open

Import error despite having imported all dependencies #8

ghost opened this issue Apr 27, 2021 · 9 comments

Comments

@ghost
Copy link

ghost commented Apr 27, 2021

Traceback (most recent call last):
File "touhou_bad_apple_v4.0.py", line 1, in
import cv2
ImportError: No module named cv2

@CalvinLoke
Copy link
Owner

Hmm that is weird, did you do pip install -r requirements.txt?

Also would help if you could include what Python version you are running.

@ghost
Copy link
Author

ghost commented May 1, 2021

i did and it said that i had already installed all dependencies
also i tried both using python and python3

@CalvinLoke
Copy link
Owner

Could you provide the specific version of python? If you are running Python 3.9.X, you might want to get 3.8.X, as cv2 does not currently support 3.9.X.

Also if you have both python and python3, install the requirements for Python 3 by using
pip3 install -r requirements.txt instead.

@ghost
Copy link
Author

ghost commented May 1, 2021

ok, i'll try

@ghost
Copy link
Author

ghost commented May 1, 2021

yooo it worked, thanks man

@ghost ghost closed this as completed May 1, 2021
@ghost ghost reopened this May 1, 2021
@ghost
Copy link
Author

ghost commented May 1, 2021

actually i'm having another problem now

@ghost
Copy link
Author

ghost commented May 1, 2021

Your option: 1
Original mp3 (0), Midi (1)
Enter 0 or 1: 1
Beginning ASCII generation...
Progress: [####################### ] 99% Frame 6571 of 6572 frames
ASCII generation completed! ASCII generation time: 33.6171236038208Traceback (most recent call last):
File "/home/kali/bad-apple/touhou_bad_apple_v4.0.py", line 204, in
main()
File "/home/kali/bad-apple/touhou_bad_apple_v4.0.py", line 190, in main
play_audio(path_to_file)
File "/home/kali/bad-apple/touhou_bad_apple_v4.0.py", line 24, in play_audio
pygame.mixer.music.load(path)
pygame.error: Couldn't open /etc/timidity/freepats.cfg

do i have to edit something in the file?

@ghost
Copy link
Author

ghost commented May 1, 2021

it looks like it can't recognize the audio format for some reason

@CalvinLoke
Copy link
Owner

Hi there, really sorry for replying back so late. As option 1 plays back the midi file, it requires the use of a midi player. Judging by your directory, your host system seems to be Linux-based, which I presume does not have a built-in midi player. You might want to search up on that.

Cheers

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