V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
zcsnbb
V2EX  ›  Python

我的目录结构是这样的 每个文件夹下都是有__init__的 没有写出来 我想在 insert 中导入 ccxt 应该如何写

  •  
  •   zcsnbb · 2018-10-26 19:21:30 +08:00 · 1284 次点击
    这是一个创建于 1980 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我写的是 from hunter.trade import ccxt 但是运行时提示我 no moudle named hunter

    2 条回复    2018-10-29 10:53:59 +08:00
    zh826256645
        1
    zh826256645  
       2018-10-27 16:13:22 +08:00
    首先, 你得确定你的运行文件和 hunter 是不是在同级目录下,或者 hunter 在不在你的 python 库中
    如果不满足上述条件, 就会出现 no moudle named hunter
    解决方法参考: https://blog.csdn.net/pwc1996/article/details/52577148
    zcsnbb
        2
    zcsnbb  
    OP
       2018-10-29 10:53:59 +08:00
    了解了 python 的 import 中的坑
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3310 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 13:31 · PVG 21:31 · LAX 06:31 · JFK 09:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.