I am using the IDE called Spyder for learning Python.I would like to know in how to go about in installing Python packages for Spyder?

7

Best Answer


step 1. First open Spyder and click Tools --> Open command prompt.First open Spyder and click Tools --> Open command prompt

You should see the Command Window below.

Here we install the Python package seaborn as an example

For more details click visit this link,https://miamioh.instructure.com/courses/38817/pages/downloading-and-installing-packages

I am running Spyder 4.2.4 and for me following solution turned out to be working:

  1. open tools-> preferences -> python interpreter
  2. click 'use the following python interpreter'preferences_screenshot
  3. point the location to local python installation, in my case : C:\Users\MYUSER\AppData\Local\Programs\Python\Python37\python.exe
  4. Click OK and restart the kernel.

Now the pip started to work and I was able to import any package I previously installed on the cmd/python CLI.

Spyder is a package too, you can install packages using pip or conda, and spyder will access them using your python path in environment.Spyder is not a package manager like conda,, but an IDE like jupyter notebook and VS Code.

For the latest versions of Spyder use this consoleat right bottom

Note: Once you hit enter it may take some time to install and you can't see the progress until it finishes.

Else:

  1. Open anaconda command prompt

  2. Activate your environment: conda activate env-name

  3. Install the package: conda install your-package-name

  1. Download Miniconda from here https://docs.conda.io/en/latest/miniconda.html
  2. Open terminal on your MAC.
  3. Update conda by running the following command: conda update conda
  4. Create a new conda environment for Spyder by running the following command: conda create --name spyder_env
  5. Activate the new environment by running the following command: conda activate spyder_env
  6. Install Spyder by running the following command: conda install spyder
  7. Wait for the installation process to complete. This may take several minutes, depending on your internet connection speed.
  8. Launch Spyder by running the following command: spyder, Remember you will always have to launch spyder from terminal, it wont show up on your applications.
  9. Go to console on spyder and write conda install pipNow if you want to install say 'numpy' both 'pip install numpy' and 'conda install 'numpy' should do the trick.

I have not checked if the ways described by people here before me work or not.I am running Spyder 5.0.5, and for me below steps worked:

  1. Step 1: Open anaconda prompt (I had my Spyder opened parallelly)
  2. Step 2: write - "pip install package-name"

Note: I got my Spyder 5.0.5 up and running after installing the whole Anaconda Navigator 2.0.3.

I installed Basic Python IDLE(python 3.9)

As I used to Spyder. I installed a standalone Spyder from https://www.spyder-ide.org/

Then I faced problems for packages

I tried this one

pip install spyder spyder-terminal