Skip to content
Advertisement

Installing yfinance errors window 7 Anaconda

I tried installing yfinance using pip install yfinance and I got:

JavaScript

Then tried conda install -c ranaroussi yfinance and got:

JavaScript

Any idea what’s going on and how I can install it? Thanks in advance!

Advertisement

Answer

Case 1: pip

Source: Permission denied error by installing matplotlib

Linux / macOS

From your terminal, you can install the package for your user only, like this:

JavaScript

OR

You can use su or sudo from your terminal, to install the package as root:

JavaScript

Windows

From the Command Prompt, you can install the package for your user only, like this:

JavaScript

OR

You can install the package as Administrator, by following these steps:

  1. Right click on the Command Prompt icon
  2. Select the option Run This Program As An Administrator
  3. Run the command pip install <package>

P/s: You don’t have the right/permission, hence the system block you from installing via pip, you need to be an administrator.

Case 2: conda

This message tells you that the library/package version required by finance has a conflict with the existing preinstalled one. One solution will be create another environment for it.

Source: Anaconda – UnsatisfiableError: The following specifications were found to be in conflict

Create a new conda environment for Python 3:

JavaScript

Create a new conda environment for Python 2.7:

JavaScript

Activate it:

JavaScript

Alternatively, for older conda versions on Windows:

JavaScript

on Unix (including Mac OS X):

JavaScript

Once activated, install your packages:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement