Jupyter notebook
-
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
- register a new kernel based on the environment:
-
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)