Assuming I don't have pandas and numpy installed in my Python, How can I refresh my terminal after successfully install a module.
I tried installing these 2 modules using a code in my install.py
:
try:
import pandas as pd
except ImportError:
from pip._internal import main as pip
pip(['install', '--user', 'pandas'])
try:
import numpy as np,pandas as pd
except ImportError:
from pip._internal import main as pip
pip(['install', '--user', 'numpy'])
print "Dependencies installed successfully"
Then I import it to my combined.py
then imported pandas
and numpy
from install import *
import pandas as pd
import numpy as np
The installation was successful but after that this error occurs:
import pandas as pd
ImportError: No module named pandas
When I tried to run it, of course pandas and numpy are installed, It doesn't show the error, I think the terminal didn't recognize the module installed. Any Solutions for this?