简体   繁体   中英

import win32file not found with Myro

I'm trying to install the myro package so I can mess around with a Scribbler robot . After successfully installing the package, I get the following error:

from myro import *

Traceback (most recent call last):
  File "<pyshell#4>", line 1, in -toplevel-
    from myro import *
  File "C:\Python24\Lib\site-packages\myro\__init__.py", line 18, in -toplevel-
    from myro.system import *
  File "C:\Python24\Lib\site-packages\myro\system.py", line 2, in -toplevel-
    import os, string, serial, sys, time
  File "C:\Python24\Lib\site-packages\serial\__init__.py", line 13, in -toplevel-
    from serialwin32 import *
  File "C:\Python24\Lib\site-packages\serial\serialwin32.py", line 9, in -toplevel-
    import win32file  # The base COM port and file IO functions.
ImportError: DLL load failed: The specified module could not be found.

Python version is 2.4.4 (as used by the package). Also, I have the directory C:\\Python24\\Lib\\site-packages\\win32 , and there is the file win32file.pyd . I have no clue why this is happening.

Any thoughts?

This happened to me too. All I had to do to fix it was uninstall and reinstall the program(suck but works). Here are some detailed instructions:

Myro Installation and Setup

You will be downloading and installing Myro to your computer. At the end of the installation, Python, an IDLE and special helper files for Myro will be ready to use on your computer.

Before you start, please read through these directions. The installation and setup instructions will outline what to do for a Windows machine (specifically Windows XP) but many of the steps will need to be performed on other platforms. Installation instructions for Linux, MacOS X and Windows are provided on the IPRE website.

Follow the directions below very carefully. Myro installation and setup will not go smoothly if you rush through the process and overlook important details. You may want to check off each step as it is completed. Note: You will not need to set up the hardware.

Python2.4 was the latest version of Python at the time these instructions were written. Don't be surprised if there is something more recent now.

You should already have a basic knowledge of how to download files and create folders on your computer. If you do not, consult the Windows Help menu and learn the details you don't know. Step 1: Read the Instructions

Please read these instructions thoroughly before continuing to Step 2. You may want a parent or friend to sit with you for support. Reading and following directions takes practice.

Every computer is different, so don’t be surprised if during the installation and setup process you have to make some minor adjustments. In those situations, simply accept any default choices that Windows makes for you. Instructions specific to systems other than Windows XP can be found on the IPRE site as well as a list of possible problems and the solutions.

Step 2: Download Myro

Go to the Myro Installation Manual (http://wiki.roboteducation.org/Myro_Installation_Manual) section of the IPRE website.

Scroll down the page and to the section titled Myro Installation and Setup. Click the Windows Setup link. (If you are running a different operating system, click the appropriate link.)


No matter which version of Windows you have, click the link to download the Myro ZIP File.


When the File Download dialog box appears, choose the Save button.


Save the zip file to the root directory (C:) of your computer’s hard drive. The directory structure of every computer is different, but make sure your root directory appears in the “Save in” window and the file appears in the “File name” window as shown below. Select Save.


The name of the C: drive will vary from one computer to another.  You can be pretty sure you are saving the file in the right place if “C:” appears in the Save in: window.

After completing the installation, you can archive this file to a different folder if you prefer.  Do not delete the file in case you may need to re-install at a later date.

Once the download is complete, open the folder to your root directory.

You should see the saved file myro-all-270.zip. Your directory and version number may be different.

Step 3: Install Myro

Open the myro-all-270.zip file by double clicking on it.

Inside the Zip file is a folder titled Myro Install Files. Copy this folder to your Desktop.

Once on your Desktop, open the Myro Install Files folder. Important Note: Opening the folder from within the Zip folder will not work. The folder must be located outside the Zip folder.


If you have Windows XP, double click the install.bat file. If you have Windows Vista or Windows 7, right click the install.bat file and choose “Run as Administrator”.

A series of dialog boxes will now appear. Choose the default settings for each by clicking the Next button.

Step 4: Setup Myro

After the installation is complete, you will see the Start Python.pyw icon on your Desktop.


Move the Start Python.pyw file to your CP1 Course Files folder you previously created on your local hard drive (C:). Doing so will allow you to easily save your work to the proper folder instead of on your Desktop.

Once the Start Python.pyw file is in your CP1 Course Files folder, you can launch Python by double clicking the Start Python.pyw icon. The IDLE for Python will launch.


You are now ready to type your first Python program. Do not type in the sample program from the IPRE website.  Do not attempt the Hardware Setup for the robot. This has been done for you.

Sometimes installation and setup are not successful on the first attempt. If that happens to you, please re-read the instructions carefully and try again. After a second unsuccessful attempt, please contact your instructor for additional assistance.

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