E
E
Evgeny Petryaev2020-04-22 15:25:42
Python
Evgeny Petryaev, 2020-04-22 15:25:42

Problem with python import?

I'm new to python, help someone is not difficult, I use the following code:

print('hello world!')
from mutagen.mp3 import MP3
ff = open('D:\\git\\Tropic-Island\\Tropic-Island\\Java\\Projects\\Example\\day of victory 2.m3u8', 'r')
array_of_strings = ff.read().split('\n')
ff.close()
ff = open('D:\\git\\Tropic-Island\\Tropic-Island\\Java\\Projects\\Example\\day of victory 3.m3u8','w')
for i in range(len(array_of_strings)):
        f = MP3(array_of_strings[i])
        ff.write(array_of_strings[i]+'\n')
        ff.write(str(f.info.length)+'\n')
ff.close()
print('hello world!')

I use pycharm, but forgot how to install
Traceback module (most recent call last):
File "C:/Users/User/.PyCharmCE2019.1/config/scratches/scratch.py", line 2, in
from mutagen.mp3 import MP3
ModuleNotFoundError : No module named 'mutagen'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Pankov, 2020-04-22
@Gremlin92

sudo pip install mutagen
Or in the pycharm settings:
5ea0389a2207b643382040.png
On the right is a plus sign with the hint "Install"

B
bbkmzzzz, 2020-04-23
@bbkmzzzz

What is the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question