yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

anaconda couldn't finish dowanload 08/24/2019

Open zhghao opened this issue 5 years ago • 32 comments

I tried several times (remove downloaded bz2 file and re-download), doesn't work out

Downloading and Extracting Packages yfinance-0.1.44 | 535 KB | ############################################################################ | 100%

InvalidArchiveError('Error with archive C:\********\Anaconda3\pkgs\yfinance-0.1.44-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink (errno=22, retcode=-25, archive_p=2332365645376)')

zhghao avatar Aug 24 '19 18:08 zhghao

same here

crsarav avatar Sep 05 '19 01:09 crsarav

Does this also happen when installing using Pip?

ranaroussi avatar Sep 05 '19 07:09 ranaroussi

via conda doesn't work

Capturar-erro-conda.png

edmilsonsgjk avatar Sep 07 '19 16:09 edmilsonsgjk

Does installing via pip works?

ranaroussi avatar Oct 27 '19 17:10 ranaroussi

Is this still going on?

ranaroussi avatar Nov 10 '19 17:11 ranaroussi

still same issue . I had to use pip

alex-movila avatar Nov 12 '19 15:11 alex-movila

Can confirm this is still an issue with conda installations!

Can use pip to get around this, but would rather it sit in the conda environment 😢

bobbayj avatar Nov 18 '19 12:11 bobbayj

I tried several times (remove downloaded bz2 file and re-download), doesn't work out

Downloading and Extracting Packages yfinance-0.1.44 | 535 KB | ############################################################################ | 100%

InvalidArchiveError('Error with archive C:********\Anaconda3\pkgs\yfinance-0.1.44-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink (errno=22, retcode=-25, archive_p=2332365645376)')

Try to "Run as Administrator" your command prompt

eltresmola avatar Dec 06 '19 21:12 eltresmola

I was just installing this today on Windows 10.

  1. I tried to install using conda - "conda not found".
  2. I installed yfinance with pip - worked perfectly
  3. I launched the Anaconda Powershell prompt and tried it: "package not found"

But, it installed with pip and it works fine. Thanks!

zenmark29 avatar Jan 08 '20 02:01 zenmark29

Yes, it is still a problem as of today (2/10/2020). Windows 10. Tried with run as admin with no avail.

Error message "InvalidArchiveError('Error with archive C:********\Anaconda3\pkgs\yfinance-0.1.44-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink..."

georgewayne avatar Feb 10 '20 23:02 georgewayne

Same on windows10.

conda install -c ranaroussi yfinance
InvalidArchiveError('Error with archive C:\Users\..。\yfinance-0.1.54-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink')

peng-an avatar Apr 03 '20 03:04 peng-an

I ran Anaconda Powershell Prompt as administrator and it worked using: pip install yfinance

Yesman007 avatar May 23 '20 20:05 Yesman007

As mentioned by @alvaroritter when having this error even trying with the simple pip, you can install it with the Anaconda Prompt window in your selected environment with the following code:

$ pip install yfinance --upgrade --no-cache-dir

moniz-r avatar Jun 15 '20 19:06 moniz-r

Any update on this?

vickylance avatar Aug 09 '20 06:08 vickylance

This problem still exists today 18Sep2020 using conda. Seems like for the time being, one has to use pip. The problem with pip is that it can mess up the conda packages.

helpme1 avatar Sep 18 '20 01:09 helpme1

I tried installing yfinance on Windows 10 using Conda and was greeted with the same error. So the problem persists as on October 20, 2020.

sbnimbalkar avatar Oct 20 '20 04:10 sbnimbalkar

InvalidArchiveError('Error with archive C:\Users\Daniel\anaconda3\pkgs\yfinance-0.1.54-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink')

How do i resolve this error?

shivkonar1802 avatar Nov 02 '20 19:11 shivkonar1802

Problem is persisting as of 19 Nov 2020.

I am getting the InvalidArchiveError using Win 10 and conda 4.9.2, and so doesn't show up as an installed package in my environment. I then tried installing with pip install yfinance, which installs the package, but as @pedromonzu says, all the dataframes are empty.

On MacOS 10.14.6 and conda 4.5.4, the package installs to the environment, but I am faced with the same issue as above where the dataframes are still empty.

jhardiman1 avatar Nov 19 '20 11:11 jhardiman1

Windows 10 and with Conda I got the same error. I tried pip install but the package cannot be imported. Problem persists as of 22/11/2020.

Rayjiao123 avatar Nov 23 '20 01:11 Rayjiao123

Same error message for me, using conda.

InvalidArchiveError('Error with archive C:\Users\Fromage\anaconda3\pkgs\yfinance-0.1.54-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink')

oski89 avatar Nov 29 '20 00:11 oski89

+1 Same error for me.

plsloan avatar Dec 10 '20 14:12 plsloan

Same problem here. Installed with pip as well. No way to make it work.

maxmax91 avatar Dec 22 '20 23:12 maxmax91

@maxmax91 @plsloan @oski89 @Rayjiao123 @helpme1

Please check my below answer for this issue. It might help you. https://github.com/conda/conda/issues/9913#issuecomment-750322822

aashishnk avatar Dec 23 '20 14:12 aashishnk

I have a Windows 10 for Workstations machine that is fully patched.

I did a brand new install of Anaconda Navigator today (version 1.10.0). That has conda version 4.9.2.

I am seeing the exact same error as everyone else here:

InvalidArchiveError...yfinance-0.1.54-py_0.tar.bz2. You probably need to delete and re-download or re-create this file. Message from libarchive was:\n\nCould not unlink')

aashishnk: I followed your link, which ultimately worked for me. Thanks much for figuring that out! But your description was insufficient! It took the subsequent comment from bakiba to set me down the right path.

Here are the complete steps that I did:

1) in Windows Explorer go to
	C:\Users\alfred\anaconda3\pkgs

2) create a new directory
	yfinance-0.1.54-py_0

3) copy into that directory the file
	C:\Users\alfred\anaconda3\pkgs\yfinance-0.1.54-py_0.tar.bz2
that should have been downloaded by the initial failed command

4) right click on
	C:\Users\alfred\anaconda3\pkgs\yfinance-0.1.54-py_0\yfinance-0.1.54-py_0.tar.bz2
and select 7-Zip --> Extract here
That should extract the file
	yfinance-0.1.54-py_0.tar

5) right click on
	yfinance-0.1.54-py_0.tar
and select 7-Zip --> Extract here
That should extract the desired items.

6) delete the files
	yfinance-0.1.54-py_0.tar.bz2
	yfinance-0.1.54-py_0.tar
inside
	C:\Users\alfred\anaconda3\pkgs\yfinance-0.1.54-py_0

7) in the original Anaconda base environment Terminal, rerun
	conda install -c ranaroussi yfinance

None of us should have to be doing this hack, however.

Is there a bug with conda or yfinance?

Lack of Windows permissions?

Ran: is it problematic for you to have compressed with bz2?

RobustCoder avatar Jan 16 '21 20:01 RobustCoder

WORKING!!!! Buenas tardes, finalmente he conseguido instalarlo y dejarlo funcionando siguiendo las indicaciones anteriores de RobustCoder con alguna modificación. No me funcionaba con lo indicado por RobustCoder porque cuando ejecutaba el paso 7) me borraba el directorio "yfinance-0.1.54-py_0" creado en el punto 2) Los pasas a seguir son:

  1. Seguir todos los pasos indicado por RobustCoder hasta el paso 6)
  2. Ir al directorio D:\Anaconda3\pkgs\yfinance-0.1.54-py_0\site-packages (cada uno en el path que lo tenga), y copiar las dos carpetas que hay
  3. Pegarlas en el directorio D:\Anaconda3\Lib\site-packages (cada uno en el path que lo tenga)
  4. Es posible, a mi me pasó, que el código de un error porque necesita también el paquete Multitasking, si os pasa tambien tenéis que hacer lo mismo que con YFinance, osea, ir a D:\Anaconda3\pkgs\multitasking-0.0.9-py_0\site-packages y copiar las dos carpetas que hay y pegarlas en D:\Anaconda3\Lib\site-packages

Espero que os ayude, saludos desde España.

rcd71 avatar Feb 05 '21 21:02 rcd71

Hey! so rcd71 is totally right, if you just copy the site-packages folder from step 5) that's in pkgs and paste it into Lib, complete step 7) and it works! Personally, I didn't have to do Multitasking install manually. Good luck out there! Thank you to Robust Coder for getting us most of the way! Translation for credit: thanks for the final detail rcd71! [from google translate] " WORKING !!!! Good afternoon, I have finally managed to install it and leave it working following the RobustCoder instructions above with some modification. It didn't work for me with what was indicated by RobustCoder because when I executed step 7) it would delete the directory "yfinance-0.1.54-py_0" created in point 2) The steps to follow are:

Follow all the steps indicated by RobustCoder up to step 6) Go to the directory D: \ Anaconda3 \ pkgs \ yfinance-0.1.54-py_0 \ site-packages (each one in the path that has it), and copy the two folders there Paste them in the directory D: \ Anaconda3 \ Lib \ site-packages (each one in the path that has it) It is possible, it happened to me, that the code of an error because it also needs the Multitasking package, if it happens you also have to do the same as with YFinance, I mean, go to D: \ Anaconda3 \ pkgs \ multitasking-0.0.9 -py_0 \ site-packages and copy the two existing folders and paste them in D: \ Anaconda3 \ Lib \ site-packages I hope it helps you, greetings from Spain."

heavycello avatar Feb 24 '21 19:02 heavycello

For synopsis:

  1. download the latest yfinance build at: https://anaconda.org/ranaroussi/yfinance/files
  2. find your pkgs in folder in the Anaconda3 path, and make sure any yfinance .tar files are deleted.
  3. make a new folder called: yfinance-0.1.54-py_0 (or newer)
  4. paste the yfinance-0.1.54-py_0.tar.bz2 file (or newer) and use a program like 7-Zip to extract the .tar file
  5. use 7Zip again to extract the folders from the new ,tar file
  6. in the site-packages folder, copy the two yfinance folders that are here.
  7. find the Anaconda3/Lib/site-packages folder and paste the yfinance folders here.
  8. make sure to delete the .tar and .tar.bz2 files from the original pkgs/yfinance-0.1.54-py_0 folder.
  9. run conda install -c ranaroussi yfinance
  10. did it work? celebrate! I spent way more time on this than I planned ;) if it didn't work, than perhaps try the same process with the multitasking-0.0.9-py_0 package as well.

hope this summary helps. Thanks RobustCoder and rcd71 for the fix!

heavycello avatar Feb 24 '21 19:02 heavycello

Still doesn't work for me unfortunately even after running the process several times. pip install has the known empty dataframe issue.

Olivair avatar Mar 03 '21 21:03 Olivair

Thank you, Heavycello! I was going crazy with this shit. I needed to do the same steps for "Multitasking" and at the end it worked.

alexanu avatar Mar 17 '21 10:03 alexanu

Hi All, I ran into this issue trying to run yfinance through an Anaconda installed Spyder notebook. This was the error I received:

"No QCoreApplication instance found. Application patches not applied. You have to call load_stylesheet function after instantiation of QApplication to take effect."

After some digging I found that I was not able to install yfinance via conda even with >conda install -c ranaroussi yfinance

Instead of installing via conda, I installed pip in my environment (not base) and then called >pip install yfinance

bowling-knight avatar Jun 24 '21 06:06 bowling-knight