简体   繁体   中英

How do i fix the following Python error: no module named Playback?

I am trying to run a script that was given to me and when i try to run it, I am given the following error message:

Traceback (most recent call last):

File "C:\Users\XX\Documents\XX\Project\Experiments\Y-Maze\Data\M06\ymaze_working_script1.py", line 74, in <module>

from playback import Playback

ImportError: No module named playback

Code that this error is from:

#################################################################
### DON'T EDIT FROM HERE ###
from ymaze_track import MouseTracker
from ymaze_mark import Marker
from ymaze_track import FileHandler
import os
import csv
 import numpy as np
 import time
 from tkFileDialog import askopenfilenames
 import sys
 import Tkinter as tk
 from playback import Playback

Is playback a module that needs to be added to python or is inbuilt in? and if so - where can I find it?

playback is not a standard python module, so you have to install it to use it. Run this command from the command line:

pip install playback

If that doesn't work, this should:

py -m pip install playback

Here is a tutorial on using pip to install python modules.

playback is not a standard python module so you must add it to your own system python modules

You can do this with run pip install playback

If you got other errors same as the error you described you can find package installation command by searching in https://pypi.org/

And if your python code has requirement text file which most of the times named requirements.txt

You can run pip install -r requirements.txt

For installing all needed package easily

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM