2016-11-07 65 views
0

我安裝了peewee,但它給了我幾個警告。然後它說沒有找到peewee,但是如果我運行python shell,我可以導入peewee。有人能幫助我理解如何解決這個問題嗎?說找不到命令:peewee,但後來我可以在python shell中導入peewee

(virt1) ☁ ~ pip install peewee 
Collecting peewee 
/Users/gregwienecke/virt_env/virt1/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. 
SNIMissingWarning 
/Users/gregwienecke/virt_env/virt1/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. 
InsecurePlatformWarning 
Using cached peewee-2.8.5.tar.gz 
Building wheels for collected packages: peewee 
Running setup.py bdist_wheel for peewee ... done 
Stored in directory: /Users/gregwienecke/Library/Caches/pip/wheels/01/37/92/e58e351fd9934c1167e2b47229ffe6f2dac238a3c3e76aa198 
Successfully built peewee 
Installing collected packages: peewee 
Successfully installed peewee-2.8.5 

(virt1) ☁ ~ peewee --version 
zsh: command not found: peewee 

(virt1) ☁ ~ which peewee 
peewee not found 

(virt1) ☁ ~ python 
Python 2.7.6 (default, Sep 9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import peewee 
>>> 

回答

3

這工作正常。 peewee是一個python模塊,沒有命令行應用程序。它的意思是用在python腳本中,就像你用「import peewee」一樣。

檢查github上的peewee示例:pee wee examples on github