LW Senior Architect

Anaconda(3) - problems

2017-01-12
Wu Liu

Jupyter notebook

  1. the modules in the created enviroment cannot be found in jupyter

    there are 2 solutions as the following:

    • register a new kernel based on the environment:
       $ source activate stock
       $ conda install ipykernel
       $ ipython kernel install --name stock
      
    • install the jupyter notebook into the environment
       $ source activate stock
       $ conda install notebook
       $ jupyter notebook
      
  2. how to get the source code of a python object

    need to make use of the module:inspect

    $ import inspect
    $ inspect.getsourcelines(object)
for all the other functions in module:**inspect**, please refer to [inspect](https://docs.python.org/3/library/inspect.html)

reference


下一篇 Anaconda(2) - use

Comments