yfinance
yfinance copied to clipboard
anaconda couldn't finish dowanload 08/24/2019
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)')
same here
Does this also happen when installing using Pip?
via conda doesn't work
Does installing via pip
works?
Is this still going on?
still same issue . I had to use pip
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 😢
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
I was just installing this today on Windows 10.
- I tried to install using conda - "conda not found".
- I installed yfinance with pip - worked perfectly
- I launched the Anaconda Powershell prompt and tried it: "package not found"
But, it installed with pip and it works fine. Thanks!
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..."
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')
I ran Anaconda Powershell Prompt as administrator and it worked using: pip install yfinance
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
Any update on this?
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.
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.
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?
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.
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.
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')
+1 Same error for me.
Same problem here. Installed with pip as well. No way to make it work.
@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
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?
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:
- Seguir todos los pasos indicado por RobustCoder hasta el paso 6)
- 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
- Pegarlas en el directorio D:\Anaconda3\Lib\site-packages (cada uno en el path que lo tenga)
- 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.
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."
For synopsis:
- download the latest yfinance build at: https://anaconda.org/ranaroussi/yfinance/files
- find your pkgs in folder in the Anaconda3 path, and make sure any yfinance .tar files are deleted.
- make a new folder called: yfinance-0.1.54-py_0 (or newer)
- 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
- use 7Zip again to extract the folders from the new ,tar file
- in the site-packages folder, copy the two yfinance folders that are here.
- find the Anaconda3/Lib/site-packages folder and paste the yfinance folders here.
- make sure to delete the .tar and .tar.bz2 files from the original pkgs/yfinance-0.1.54-py_0 folder.
- run conda install -c ranaroussi yfinance
- 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!
Still doesn't work for me unfortunately even after running the process several times. pip install has the known empty dataframe issue.
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.
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