在web2py的本地安装中安装Python模块

编程入门 行业动态 更新时间:2024-10-09 11:22:36
本文介绍了在web2py的本地安装中安装Python模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在Windows计算机上运行web2py.

I am running web2py on a Windows machine.

我正在处理一个应用程序,但是它一直在出错,因为它表示未安装我要使用的模块.但是它安装在我的本地python安装中.

I'm working on an application, but it keeps erroring because it says the module I'm trying to use isn't installed. It is however installed in my local python install.

如何安装模块,以便web2py可以识别它们?

How can I install modules so that web2py can recognize them?

推荐答案

web2py可以识别本地Python安装中具有的任何模块,除非您在应用程序的/modules文件夹下具有相同名称的模块.

web2py recognize any module you have in your local Python installation, unless you have a module with the same name under /modules folder of your application.

如果您在Windows上,建议您不要使用web2py的.exe版本(此版本仅用于研究),并且它具有独立的隔离Python解释器.

If you are on windows I do not recommend the use of .exe version of web2py (this version is only for studies) and it has a self contained isolated Python interpreter.

确保您使用的是 web2py的源版本和Python 2.5+您的窗户.

Make sure you are using source version of web2py and Python 2.5+ on your windows.

web2py应该从您的Python路径导入任何模块,您也可以将模块拖放到app/modules文件夹中,然后web2py会在导入内容时首先检查该模块.

web2py should import any module from your Python path, also you can drop modules in app/modules folder ], then web2py will check there first when import something.

更多推荐

在web2py的本地安装中安装Python模块

本文发布于:2023-06-11 03:30:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/625716.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   web2py   Python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!