python - 在 OSX 10.8.2 上使用 Python 2.7 获取适用于 Google App Engine 的 AppTrace

标签 python google-app-engine python-2.7

在我的生活中,我无法让 AppTrace 在我的 Google App Engine 开发服务器(OSX 10.8.2 上的 Python 2.7)上运行,主要是因为:

ImportError: dlopen(/apptrace/guppy/sets/setsc.so, 2): Symbol not found: __PyLong_AsScaledDouble
Referenced from: /apptrace/guppy/sets/setsc.so
Expected in: flat namespace in /apptrace/guppy/sets/setsc.so

这类似于以下问题,除了问题是询问在 GAE 上进行分析/监控的最佳方式,并且接受的答案没有解决 ImportError 问题: Memory profiling/monitoring (python) on Google AppEngine

我也从 Guppy 的跟踪器上看到了这个信息,但它仍然没有解决问题: http://sourceforge.net/tracker/?func=detail&aid=3047282&group_id=105577&atid=641821

当我直接从主干获得 0.1.9 版本时,这是我的输出:

pip install https://guppy-pe.svn.sourceforge.net/svnroot/guppy-pe/trunk/guppy
Downloading/unpacking https://guppy-pe.svn.sourceforge.net/svnroot/guppy-pe/trunk/guppy
  Downloading guppy
  Checking out https://guppy-pe.svn.sourceforge.net/svnroot/guppy-pe/trunk/guppy to /var/folders/w7/k0q671gx6hb03_rl_tmcnkq80000gn/T/pip-JA8fuK-build
  Running setup.py egg_info for package from https://guppy-pe.svn.sourceforge.net/svnroot/guppy-pe/trunk/guppy

Cleaning up...

这输出比 Guppy 跟踪器声明的要少得多。但是,如果我运行 python -c 'import guppy; import guppy.sets' 我仍然得到与以前相同的 ImportError。

我远不是 python 甚至 OSX 专家,所以任何关于可能配置不正确或可能指向错误位置的建议都会有所帮助。谢谢

最佳答案

成功了!基本上,当我使用这些说明安装 Guppy 时: http://code.google.com/p/apptrace/wiki/UsingApptrace

我的 OSX 10.8 不是使用 GCC 4.2 构建的。我不得不更新自制软件以使用 GCC 4.2 构建:

brew update
brew tap homebrew/homebrew-dupes
brew install apple-gcc42

我能够从这篇文章中找到答案: https://superuser.com/questions/400179/gcc-on-os-x-lion-with-xcode-4-3-1

关于python - 在 OSX 10.8.2 上使用 Python 2.7 获取适用于 Google App Engine 的 AppTrace,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13189297/

相关文章:

python - cx_Freeze 将 Python 和 Pygame 文档编译为 .exe 文件时出现奇怪的错误

python-2.7 - Pandas 将对象列转换为 str - 列包含 unicode、float 等

python - 在子类型中使用额外的构造函数参数违反了 LSP 原则

python - 带有 where 子句的 Pandas read_sql 使用 "in"

java - 如何在 Eclipse 中实现与 build.gradle 相同的功能(使用 Android 开发者工具)

google-app-engine - 有没有办法知道一组应用程序引擎任务队列任务何时完成?

python - 导入 cx_Oracle 模块时出错 [Python]

python - 将 PySpark 数据帧写入 MongoDB 插入字段作为 ObjectId

python - 无法在 gae 中运行简单的 helloworld (python 2.7)

python - 如何在包含 True 和 False 值的数组中找到 True 值所在的索引?