Skip to content Skip to sidebar Skip to footer

Accessing Package In Python Virtual Environment

I have a virtual environment in which I have installed 'geopandas'. When I do a pip list it lists this package as well. But when I try to call it in my jupyter notebook via 'import

Solution 1:

You can verify that your notebook is running in the correct virtual environment by doing:

import sys
sys.version

Here's how to run a Jupyter notebook in a virtualenv.

Solution 2:

You should check if your notebook is using the correct kernel (the correct virtualenv). If you are still in the kernel using your standard environment and geopandas is not installed, it is possible you get this error.

So check if you are working in the correct kernel: kernel check

You can install a kernel in jupyter notebook by activating the venv and then installing it:

source activate myenv
python -m ipykernel install --user--name myenv --display-name "Python (myenv)"

More info about this install here.

Post a Comment for "Accessing Package In Python Virtual Environment"