【python】一些tips

  • Where is gen_math_ops script in tensorflow?
    from tensorflow.python.ops import gen_math_ops
    这里写图片描述

  • 因为我是用的是虚拟环境,ipython要在虚拟环境中调用,具体方法:
    calling ipython from a virtualenv
    alias ipy="python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'"

    This is a great way of always being sure that the ipython instance always belongs to the virtualenv’s python version.
    This works only on ipython >2.0.

  • python的模块可以看到对应的路径

    > import module
    > module.__path__

猜你喜欢

转载自blog.csdn.net/yifen4234/article/details/80296857