When using iPython and Jupyter Notebook, the commands
import numpy as np
import pandas as pd
always try to import the packages from the default python directory:
C:/Users/sx449_000/AppData/Roaming/Python/Python36/site-packages
How can I change it to make it import from my anaconda site packages as below?
C:/programdata/miniconda3/lib/site-packages
First, make sure you are using the right kernel in your ipython notebook, otherwise, you can change it from kernel >> change kernel
You can also try,
import sys
sys.path.append('C:/programdata/miniconda3/lib/packages/numpy')
import numpy as np
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.