如何安装 Python 的 SimpleJson 包

发布于 2024-07-16 14:22:32 字数 216 浏览 4 评论 0原文

http://pypi.python.org/pypi/simplejson

我刚刚进入Python世界想要制作一个简单的 twitter 应用程序,需要安装 simplejson 但不知道如何设置它并让它工作。

我使用的是 Windows 系统

http://pypi.python.org/pypi/simplejson

I am just diving into the Python world and want to make a simple twitter application which requires the installation of simplejson but not sure how I can set it up and get it working..

I am on a Windows System

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

清风不识月 2024-07-23 14:22:32

我推荐 EasyInstall,一个 Python 包管理应用程序。

安装 EasyInstall 后,您应该能够转到命令窗口并键入:

easy_install simplejson

这可能需要首先将 easy_install.exe 放在您的 PATH 上,我不记得 EasyInstall 安装程序是否为您执行此操作(类似于 C:\Python25\Scripts)。

I would recommend EasyInstall, a package management application for Python.

Once you've installed EasyInstall, you should be able to go to a command window and type:

easy_install simplejson

This may require putting easy_install.exe on your PATH first, I don't remember if the EasyInstall setup does this for you (something like C:\Python25\Scripts).

江城子 2024-07-23 14:22:32

真正简单的方法是:

pip install simplejson

Really simple way is:

pip install simplejson
GRAY°灰色天空 2024-07-23 14:22:32

如果您安装了 Python 2.6,那么您已经拥有 simplejson - 只需导入 json; 这是同一件事。

If you have Python 2.6 installed then you already have simplejson - just import json; it's the same thing.

<逆流佳人身旁 2024-07-23 14:22:32

您可以像这样将 json 导入为 simplejson:

import json as simplejson

并保持向后兼容性。

You can import json as simplejson like this:

import json as simplejson

and keep backward compatibility.

開玄 2024-07-23 14:22:32

下载源码,解压到 目录下,执行 python setup.py install。

Download the source code, unzip it to and directory, and execute python setup.py install.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文