Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
526 views
in Technique[技术] by (71.8m points)

install python module using a zip file

I have downloaded a zip file from here but I don't know how to install it and then use it in my python 2.7 they said it supports both python 2 and 3

using command: "pip install hazm" after bunch of lines it gets to these errors:

creating buildemp.win-amd64-2.7Releaselibwapitisrc
C:UsersMohammadAppDataLocalProgramsCommonMicrosoftVisual C++ for Pyt
hon9.0VCBinamd64cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Icwapiti/src -
Ilibwapiti -IC:Python27include -IC:Python27PC /Tccwapiti/src/bcd.c /Fobuild
temp.win-amd64-2.7Releasecwapiti/src/bcd.obj -std=c99
cl : Command line warning D9002 : ignoring unknown option '-std=c99'
bcd.c
cwapiti/src/bcd.c(30) : fatal error C1083: Cannot open include file: 'stdboo
l.h': No such file or directory
error: command '"C:UsersMohammadAppDataLocalProgramsCommonMicrosoftV
isual C++ for Python9.0VCBinamd64cl.exe"' failed with exit status 2

----------------------------------------
Command "C:Python27python.exe -c "import setuptools, tokenize;__file__='c:
\users\mohammad\appdata\local\temp\pip-build-y3whx6\libwapiti\setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('
', '
n'), __file__, 'exec'))" install --record c:usersmohammadappdatalocalempp
ip-m_wrwt-recordinstall-record.txt --single-version-externally-managed --compil
e" failed with error code 1 in c:usersmohammadappdatalocalemppip-build-y3
whx6libwapiti

and when I use command:"python ./setup.py" these errors show up:

C:UsersMohammadDesktopTerm 6AIAI ProjectOPERATEhazm-masterhazm-master>p
ython ./setup.py
C:Python27libdistutilsdist.py:267: UserWarning: Unknown distribution option:
'install_requires'
 warnings.warn(msg)
 usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
 or: setup.py --help [cmd1 cmd2 ...]
 or: setup.py --help-commands
 or: setup.py cmd --help

 error: no commands supplied
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The right way to install a zipfile (at least if it's properly designed, but I just tested this one, and it is) is with pip:

pip install hazm-master.zip

Or, if you prefer, you can unzip it and use pip from within the directory:

unzip hazm-master.zip
cd hazm-master
pip install .

But neither of these is really necessary, because, as the project's readme says, you don't need to download it manually; just do:

pip install hazm

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...