【问题标题】:Error Creating First Pebble Project创建第一个 Pebble 项目时出错
【发布时间】:2014-01-25 14:50:05
【问题描述】:

我正在尝试创建我的第一个 Pebble 项目,但当我运行 pebble new_profile hello_world 时它就失败了。

johndoe-mbp-2:projects johndoe$ pebble new-profile hello_world
[DEBUG   ] [Analytics] header: {'User-Agent': 'Pebble SDK/2.0-BETA6 (Darwin-13.0.0-x86_64-i386-64bit-python-2.7.5)'}, data: {'ck': '2.7.5', 'cn': 'Darwin-13.0.0-x86_64-i386-64bit', 'cid': '3247db56-af31-4738-999a-uuuuu', 'tid': 'UA-66666-7', 't': 'event', 'v': 1, 'cs': '3247db56-af31-4738-999a-yyyyy'}
category: install
action: import
label: fail: missing import: No module named websocket
value: 0
Traceback (most recent call last):
  File "/Users/johndoe/pebble-dev/PebbleSDK-2.0-BETA6/bin/../tools/pebble.py", line 14, in <module>
    import websocket        
ImportError: No module named websocket

有什么想法吗?

【问题讨论】:

    标签: pebble-watch


    【解决方案1】:

    尝试卸载您计算机上的任何 websocket 模块,然后重新安装 Pebble SDK 依赖项:

    pip uninstall websocket
    pip install --user -r ~/pebble-dev/PebbleSDK-2.0-BETA7/requirements.txt
    

    注意:您需要在此命令行中更新 SDK 的位置。

    【讨论】:

      【解决方案2】:

      确保提供 requirements.txt 文件的绝对路径。我尝试从安装 Pebble SDK 的目录运行命令:

      $PEBBLE_HOME> pip install requirements.txt
      

      导致:

      Downloading/unpacking requirements.txt
        Real name of requirement requirements.txt is requirements.txt
        Could not find any downloads that satisfy the requirement requirements.txt
      Cleaning up...
      No distributions at all found for requirements.txt
      Storing debug log for failure in $HOME/.pip/pip.log
      

      检查 pip.log 文件显示 pip 正在尝试从 https://pypi.python.org/simple/requirements.txt/ 访问 requirements.txt,这是 404ing。

      一旦我改为使用绝对路径,一切都很好:

      > pip install -r $PEBBLE_HOME/requirements.txt # Where $PEBBLE_HOME is where you put the SDK
      

      【讨论】:

        猜你喜欢
        • 2015-07-21
        • 1970-01-01
        • 2019-12-23
        • 1970-01-01
        • 2021-03-14
        • 2021-11-01
        • 1970-01-01
        • 2016-02-10
        • 1970-01-01
        相关资源
        最近更新 更多