Topic – Troubleshooting Installing Packages

Troubleshooting – Installing Packages

Python has hundreds of installable packages and a program (pip.exe) that can help install them, but this is done primarily from the command line. So #1 – you need to be able to find and use a command prompt.

You may have more than one version of Python installed. To use packages with Spyder, you need to use the version that is used by Spyder – which is in the header.

Step 1 – Find out where Anaconda is looking for the packages. This will be in a site-packages directory, and you can easily do this from the Spyder console

Step 2 – You will need to launch the command prompt and go to the directory of the current version of python. The command line from Python is below (please note that the example below is not running from the Anaconda location in the path above, you should do this from your path). In the example from above, this would be c:\programdata\anaconda3\  . Note you should install packages from a root python directory (meaning python.exe will be in that directory).

If an installation fails on Access Denied, you will have to use File Manager in Windows to allow write access to the Lib directory. Go to File Manager, Right Click on the directory, Property, and permissions, and ensure you have write access for the current user.

Once this is done, you should be able to use pip directly, install conda, use conda directly (from command line), and install packages like pint.

If you have errors, you MUST SCREEN CAPTURE the errors and make sure you put all information on the discussion boards so we can troubleshoot problems.

https://www.geeksforgeeks.org/python-add-packages-to-anaconda-environment/