我正在尝试安装myro软件包,这样我就可以弄乱Scribbler robot了。成功安装软件包后,出现以下错误:

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版本是2.4.4(由软件包使用)。另外,我有目录C:\Python24\Lib\site-packages\win32,并且有文件win32file.pyd。我不知道为什么会这样。

有什么想法吗?

最佳答案

这也发生在我身上。我要做的就是修复它,然后卸载并重新安装该程序(可以正常工作)。以下是一些详细说明:

Myro安装和设置

您将下载Myro并将其安装到计算机上。在安装结束时,Python,一个IDLE和Myro的特殊帮助文件将可以在您的计算机上使用。

在开始之前,请仔细阅读以下说明。安装和设置说明将概述Windows机器(特别是Windows XP)的操作,但是许多步骤将需要在其他平台上执行。 IPRE网站上提供了Linux,MacOS X和Windows的安装说明。

请非常仔细地遵循以下指示。如果您匆忙完成该过程并忽略了重要的细节,则Myro的安装和设置将无法顺利进行。您可能需要在完成每个步骤后对其进行检查。注意:您不需要设置硬件。

在编写这些说明时,Python2.4是Python的最新版本。如果现在有最新的消息,请不要感到惊讶。

您应该已经具有有关如何在计算机上下载文件和创建文件夹的基本知识。如果不这样做,请查阅Windows帮助菜单,并了解未知的详细信息。
第1步:阅读说明

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.


步骤2:下载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.


步骤3:安装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.


步骤4:设定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.

10-06 16:15