我已经从网站上下载了sqlautocode zip文件。并运行:

python e:\sqlautocode\setup.py install


但是当我尝试:

import sqlautocode


它说“没有名为sqlautocode的模块”。

一些博客说:

sqlautocode.py xxx


但是我在系统中找不到任何名为sqlautocode.py的文件。

那么,我应该怎么做才能运行它?

谢谢!

这是我安装sqlautocode后得到的:

C:\Users\Aman>python f:\sqlautocode\setup.py install
running install
running bdist_egg
running egg_info
writing requirements to sqlautocode.egg-info\requires.txt
writing sqlautocode.egg-info\PKG-INFO
writing top-level names to sqlautocode.egg-info\top_level.txt
writing dependency_links to sqlautocode.egg-info\dependency_links.txt
writing entry points to sqlautocode.egg-info\entry_points.txt
warning: manifest_maker: standard file 'setup.py' not found

reading manifest file 'sqlautocode.egg-info\SOURCES.txt'
writing manifest file 'sqlautocode.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
warning: install_lib: 'build\lib' does not exist -- no Python modules to install

creating build\bdist.win32\egg
creating build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\entry_points.txt -> build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
copying sqlautocode.egg-info\zip-safe -> build\bdist.win32\egg\EGG-INFO
creating 'dist\sqlautocode-0.6b1-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing sqlautocode-0.6b1-py2.7.egg
removing 'c:\python27\lib\site-packages\sqlautocode-0.6b1-py2.7.egg' (and everything under it)
creating c:\python27\lib\site-packages\sqlautocode-0.6b1-py2.7.egg
Extracting sqlautocode-0.6b1-py2.7.egg to c:\python27\lib\site-packages
sqlautocode 0.6b1 is already the active version in easy-install.pth
Installing sqlautocode-script.py script to C:\Python27\Scripts
Installing sqlautocode.exe script to C:\Python27\Scripts

Installed c:\python27\lib\site-packages\sqlautocode-0.6b1-py2.7.egg
Processing dependencies for sqlautocode==0.6b1
Searching for sqlalchemy==0.8.0b2
Best match: sqlalchemy 0.8.0b2
Processing sqlalchemy-0.8.0b2-py2.7.egg
sqlalchemy 0.8.0b2 is already the active version in easy-install.pth

Using c:\python27\lib\site-packages\sqlalchemy-0.8.0b2-py2.7.egg
Finished processing dependencies for sqlautocode==0.6b1

最佳答案

您能否提供有关安装的更多信息?我只能给你一些建议。


检查安装日志,是否有一些错误信息。
检查您要安装的python版本。
我建议使用pip安装第3个库,它可以自动安装依赖项。

关于python - 如何使用sqlautocode?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/14087828/

10-13 09:08