Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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?

Welcome to Stack Overflow. If you want help with a problem, you need to be able to describe it for people to help you. That explanation usually involves showing the part of the code where the problem happens. For help with this, read How to create a Minimal, Complete, and Verifiable example. stackoverflow.com/help/mcve – Mikkel Dec 31, 2018 at 22:44

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

To do this, should i have a file called "playback" to install? On previous occassions when I installed other modules I had to input the file name of the module that I wanted to install along with the pip command in the command line. – ABadLab Jan 2, 2019 at 8:07 clicked on both the "check" and the "upvote" arrow but it wont affect the upvote arrow because my reputation is too low – ABadLab Jan 3, 2019 at 11:37

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.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.