在web2py的本地安装中安装Python模块 [英] Install Python Module in local install of web2py

查看:90
本文介绍了在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模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆