

To list locally installed packages and their version # within a Conda environment, open the Anaconda Prompt and enter the following command: conda list Installed shared (i.e., OS-level) dependencies.If you prefer to see a visual representation of the packages in your local/virtual environment, you can use the ActiveState Platform’s Web GUI, which shows:

This command will list all packages installed, including any dependencies that are found in a Pipfile.lock file. To list locally installed packages and their version # within a pipenv environment, cd into a pipenv project and enter the following command: pipenv lock -r If you just want to list a single, locally installed package and its version #, you can use one of the following commands, depending on your OS:
CONDA INSTALL PACKAGE FROM LOCAL DIRECTORY HOW TO
How to List Python Packages that are Locally Installed PipĪlthough pip installs packages globally by default, packages that have been installed locally with the –user option can also be listed using the same –user option, as follows: pip list -user To list a single globally installed package and its version #, use the following command depending on your OS: To list globally installed packages and their version # use: pip list Pip installs packages globally by default. How to List Python Packages that are Globally Installed The Pipenv, Anaconda Navigator and Conda package managers can also be used to list locally installed packages in their respective environments.īefore listing packages, it’s always a good practice to ensure that up-to-date versions of Python, Pip, Pipenv, Anaconda Navigator and Conda are in place. The Pip Package Manager can be used to list both globally and locally installed Python packages. This creates an isolated environment that will avoid many of the problems that arise because of shared libraries/ dependencies. How to List Python PackagesĪs a best practice, you should always install Python and the packages you need into a separate virtual environment for each project. Locally installed Python and all packages will be installed under a directory similar to ~/.local/bin/ for a Unix-based system, or \Users\Username\AppData\Local\Programs\ for Windows. Typically, that means Python and all packages will get installed to a directory under /usr/local/bin/ for a Unix-based system, or \Program Files\ for Windows.Ĭonversely, when a package is installed locally, it’s only made available to the user that installed it. You can install packages into your virtual environment with /anaconda/envs/venv_name/bin/pip install package_name.When a package is installed globally, it’s made available to all users that log into the system. To do this you need to find the directory of your virtual environment, which will be somewhere like /anaconda/envs/virtual_env_name/. You need to use the version of pip inside your virtual environment. If you try to run pip install 'package_name' you’ll use the global version, which will install the package outside your virtual environment.


Not all packages are available with conda install, through, and if you want one that isn’t available then you’ll have to use the alternate package manager pip. It is not at all obvious how conda and pip interact with each other, particularly in the context of virtual environments. You can use the conda install command to install many packages quickly and easily. Installing Python packages into the virtual environment is often straightforward. These virtual environments are created without any Python packages preloaded into them. Anaconda also comes with a package manager called conda.īesides its utility for installing and managing packages, conda also possesses the ability to create virtual environments which make sharing and reproducing analyses much easier. Seemingly ubiquitous in the Python world, the distribution Anaconda comes with over 200 Python packages installed.
