说没有找到命令:peewee,但是我可以在python shell中导入peewee

时间:2016-11-07 18:26:37

标签: python 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
>>>

1 个答案:

答案 0 :(得分:3)

这是正常的。 peewee是一个python模块,没有命令行应用程序。它意味着在python脚本中使用,就像你使用“import peewee”一样。

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