我安装了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
>>>发布于 2016-11-08 02:34:02
这可以正常工作。peewee是一个python模块,没有命令行应用程序。它应该在python脚本中使用,就像您对"import peewee“所做的那样。
查看github:pee wee examples on github上的peewee示例。
https://stackoverflow.com/questions/40472008
复制相似问题