命令not found:peewee,但是我可以在pythonsh中导入peewee

2024-04-26 14:48:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我安装了peewee,但它给了我几个警告。然后它显示peewee not found,但是如果我运行pythonshell,我就可以导入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
>>>

Tags: piptopyversionpackagesnotthiscan
1条回答
网友
1楼 · 发布于 2024-04-26 14:48:11

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

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

相关问题 更多 >