首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >表示命令未找到: peewee,但随后我可以在python shell中导入peewee。

表示命令未找到: peewee,但随后我可以在python shell中导入peewee。
EN

Stack Overflow用户
提问于 2016-11-08 02:26:37
回答 1查看 280关注 0票数 0

我安装了peewee,但它给了我几个警告。然后显示没有找到peewee,但是如果我运行python shell,我就能够导入peewee。有没有人能帮我弄明白怎么解决这个问题?

代码语言:javascript
复制
(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
>>>
EN

回答 1

Stack Overflow用户

发布于 2016-11-08 02:34:02

这可以正常工作。peewee是一个python模块,没有命令行应用程序。它应该在python脚本中使用,就像您对"import peewee“所做的那样。

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

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40472008

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档