gpt4 book ai didi

python - 导入 Myro 未找到的 win32 文件

转载 作者:太空宇宙 更新时间:2023-11-04 06:22:28 25 4
gpt4 key购买 nike

我正在尝试安装 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.

关于python - 导入 Myro 未找到的 win32 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11073968/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com