Unable to run or reinstall or update yfinance - python

I have been using the package yfinance to retrieve stock prices for some time. Recently, as noted in several online posts, the package stopped working due to an update to the package. I thought that this would be a simple process to update the package and fix the problem. This has not been the case.
I am using Anaconda so I want to update using conda instead of pip using PowerShell on a PC.
What I have tried so far unsuccessfully
$ conda update --all
$ conda update conda
$ conda update-c ranaroussi yfinance
None of these worked. I tried to uninstall and then reinstall Anaconda then reinstall yfinance. Yes, I agree that this seemed like overkill for what should have been a simple issue. Unfortuntaelty, now I can't even install the package. I am using the conda command that I originally used to install the package
$ conda install -c ranaroussi yfinance
, which comes from the developer's page.
https://anaconda.org/ranaroussi/yfinance
Now, I try to run this I receive an error message that the package cannot be found in my current channels.
Screenshot of error msg.
At this point, I am just spinning my wheels and would appreciate some help. I hope that someone who might have experienced a similar issue has a suggestion for how to resolve this problem.
Thanks

Even though it's hosted on anaconda.org, this package doesn't appear to be a conda package. Its page only lists PyPI source and a one-liner to install with pip; i.e. compare it to a typical conda package. Probably best here to just pip install yfinance into a conda environment.

Related

cryptocompare module in Anaconda not installed to get real time cryptocurrencies price

Ni Hao,
I am trying to read cryptocurrencies price in python. I tried to install cryptocompare module, but using the following codes in Anaconda prompt did not work:
conda install cryptocompare
conda install -c conda-forge cryptocompare
Also, I tried to install the downloaded file, but again did not work. Should I use another channel? If so, how can I add that channel. Also, if masters think better modules exist I appreciate to know that. Thanks
Try with pip
pip install cryptocompare

Trying to install new libraries on Spyder (Python 3.7)

I am new to python and I am having trouble downloading some new libraries that don't appear to be pre-installed. The names of them are rasterio and retrying. I continuously get an invalid syntax error, and I have tried using some different suggestions found online.
pip install rasterio
Above is the way I was attempting to do it, and I also tried without the pip in there, but neither option worked. I am new enough to the language that troubleshooting is very difficult. Any help is greatly appreciated!
There are several ways to install rasterio, using anaconda you have the documentation here: https://anaconda.org/conda-forge/rasterio
If you are on windows installing rasterio using pip install can be difficult since it requires binary wheels, but here is the tutorial: https://rasterio.readthedocs.io/en/latest/installation.html
I advise you to use linux since it is much easier to install packages, you can either install a dual boot or a virtual box.
I suppose you are using Spyder IDE with Anaconda. So, to install rasterio package you can open anaconda prompt and type:
conda install -c conda-forge rasterio
For further information about package installation check out this link.
Also, to install any conda packages just google it once, you will find instructions to install it mostly in anaconda's official site.
Edit:
Please remove the rasterio package once. And install it again, see if works. If it doesn't work create a new environment like: conda create --name myenv. Then install rasterio again.
If this still doesn't work, try to install rasterio from here like conda install -c ioos rasterio.

multiple environment coremltools installation

Trying to install coremltools. I installed using pip but that is not the most recent version and I have run into a bug that was solved 4 days so I must build from source. I'm on a Mac virtual desktop(windows user) and I tried cmake, but since there are multiple pythons it keeps trying to install to python 3.7 when I need it to install for python 2.7.10. The github suggest doing this:
cmake . -DPYTHON=$(which python) -DPYTHON_CONFIG=$(which python-config)
.. however as someone who doesn't use cmake for package installs I'm unsure of the correct syntax could someone give me an example statement to go off of, I would really appreciate it. Thanks
You can install it without building it manually:
pip install https://github.com/apple/coremltools/archive/master.zip
You can replace "master" with any branch or tag names.
EDIT: To update an existing install add the -U flag. Or uninstall previous installations.

Installing gspread on OSX Anaconda for Python 3.4.3

I've tried a bunch of different variations of this out of the terminal and so far no joy. I'm trying to read Google Spreadsheets and would love to do it via Anaconda. Anaconda works great, but installing the gspread package so far is no joy. Here are some of the variations of what I've tried:
conda install gspread
This just results in Error: No packages found in current osx-64 channels matching: gspread
which makes me realize that route is probably just for stuff already available via Anaconda. So I tried downloading and unzipping gspread from here: (gspread on github)
And then navigating to the folder cd /Users/jlalonde/Downloads/gspread-master/gspread/
And trying to install, via a bunch of different variations from there. Example:
conda install setup.py
...results in same error message:
Error: No packages found in current osx-64 channels matching: setup.py
So there may be a fast-and-easy way to do it, I'm just not using the right combination of commands to get it going. Here is hoping it is possible. Any Anaconda experts out there who can help? Maybe there is something other than gspread that is comparable? That would be OK, too.
pip and conda don't play well together
If you want to load using conda, run
conda install -c conda-forge gspread
You could try it with pip:
pip install gspread

Python (anaconda) add packages with pip behind proxy

sorry for asking a probalby stupid question, however, I am completely new to setting up/installing python packages, i.e. I have never done it.
So far I installed anaconda3 and worked with the pre installed packages. Now I need the google api pyhon client.
I do not even know whether pip is installed in the anaconda package but I assume it.
What have I tried so far:
In Windows cmd:
1. pip install --upgrade google-api-python-client
2. pip install -- proxy="XXX.XXX.XX.X:XX" -- upgrade google-api-python-client
3. export https_proxy="...."
pip install --upgrade google-api-python-client
I get the following errors:
cannot fetch index base url https://pypi.python.org/simple
unknown command
unknown command
In addition I tried to download the google_api_python_client and unzipped it.
However, I do not know how to proceed here.
BTW: Here in my company we are still on XP
Any help would be highly appreciated!
THANK YOU
Would like to add to the answer by #alok-nayak that you should use the following:
python setup.py install
Leads to:
Installed ~/anaconda/lib/python2.7/site-packages/google_api_python_client-1.4.2-py2.7.egg
After unzipping google_api_python_client. You should run the setup.py file
python setup.py
Also you can edit ".condarc" file in your home folder, as explained here http://conda.pydata.org/docs/config.html . enter your proxy details there

Categories

Resources