I'm using Python 3.7 and I recently upgraded to Spyder 4.2.0 from Spyder 4.1.5. Now when I run my code (which was working fine before) I get the following error:
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
So apparently Spyder thinks 'xlrd' ('Excel Reader'?) is not installed. So I went to the Anaconda prompt and tried pip install xlrd, but it replied with
Requirement already satisfied: xlrd in c:\users\michael\anaconda3\lib\site-packages (2.0.1)
I tried uninstalling and reinstalling xlrd anyways, using pip, but it didn't change anything. How do I resolve this error?
Also, I'm not sure if this matters or not, but I originally installed Spyder via Anaconda, whereas now I just downloaded Spyder 4.2.0 by itself, through this link: https://github.com/spyder-ide/spyder/releases.
Also, on the linked github page, it says: "If you are new to Python or the Scientific Python ecosystem, we strongly recommend you to install and use Anaconda. It comes with Spyder and all its dependencies, along with the most important Python scientific libraries (i.e. Numpy, Pandas, Matplotlib, IPython, etc) in a single, easy to use environment."
I had at first assumed this was meant for people downloading Python/Anaconda for the very first time, but now I'm thinking this applies to a semi newbie at Python such as me? As someone who is not very familiar with how packages and dependencies work, should I be downloading Anaconda every time I want to update Python or Spyder?
Apologies for the (probably) silly newbie question...
This sounds like you needed to re-start Spyder for it to pick up the package you installed.
However, as the author of xlrd, I would suggest you do the following:
Stop Spyder
conda install openpyxl
Start Spyder.
Change your pandas code to be pd.read_excel(..., engine='openpxyl')
Related
Just as a background, I am an R user but learning python:
I have installed python libraries I want to get familiar with (pandas, numpy, Pytorch, tensorflow...), but when I start a new project, it does not detect the packages when I try to import and requests that I install them, even though I definitely did at one point. I am obviously making mistakes when installing them, but don't know what.
I use pip as a package manager if that is relevant
Have you attempted installing pip3 and using that in place of pip? I know I had some issues a while back where pip would install my packages for python 2.X and not 3.X.
When trying to install requests or literally anything using pip it'll collect the option and then give me this ERROR every time. I can't use pip to install anything.
C:\Users\evand>pip3 install requests
Collecting requests
ERROR: Could not install packages due to an EnvironmentError: Could not find a suitable TLS CA certificate bundle, invalid path: path/to/ca-bundle.crt
Version of pip:
C:\Users\evand>pip --version
pip 19.2.3 from c:\users\evand\appdata\local\programs\python\python38-32\lib\site-packages\pip (python 3.8)
Version of Python:
C:\Users\evand>py --version
Python 3.8.3
Current Environment Variables (If this is related at all)
I have also tried the 'Repair' option using the Python Installer as well as uninstalling then reinstalling as a custom installation with 'Add to PATH' and the other options. That didn't fix the issue, so I deleted pip along with every module installed on my computer then reinstalled pip. Nada. At this point, I can no longer program with this computer because I cannot import any module in any of my scripts. I am not sure why this issue suddenly arose. Help would be very much appreciated.
This worked for me:
Uninstalling the pip configuration file in %appdata%/pip/ then 'modifying' python using the python launcher.
I recently installed Anaconda spyder 2020 version, resulting in Python 3.7.6 being installed.
I previously had ffn installed and working.
Now when I run code that tries to import ffn, it comes up with Module not found - No module named 'ffn'.
However, when I issue pip freeze at the console, I can see ffn == 0.3.3
Can anybody shed any light on why I have having problems importing ffn?
If you install anaconda it will automatically install its own version of python with a specific directory for site-packages so either you need to find and use your old python binary or install ffn again this time with the newly installed anaconda since just syncing the two site-packages directories won't work because minor releases of python (e.g 3.7 and 3.5 ) aren't necessarily compatible.
I've recently downloaded the python package colorama to use in a small project, I'm having trouble installing/importing it.
For a bit more background, I use MacOS and I have two versions of Python on my Mac; 2.7 which comes with the mac by default and 3.7 which I use to code. The package seems to have been successfully installed, as when I try to reinstall it I get the message below. However, when I try to import the colorama module using a script in python 3.7 it simply tells me it doesn't exist.
Have I installed it for the wrong version of Python? And, if so, is it possible to make 3.7 my default version of python to prevent this from happening again? Or am I wrong about this issue entirely?
Requirement already satisfied: colorama in ./Library/Python/2.7/lib/python/site-packages (0.4.1)
I am quite newbie in python and I am trying to make the qfrm 0.2.0.27 library to work. Unfortunately there is no documentation about this library. I installed it using pip and when I try to import it I get the following error:
No module named 'qfrm.Options'
Does anyone have a solutions for this? I am using python 3.5.1. and PyCharm
I also ran into this problem. The current version in the PyPi index is qfrm-0.2.0.27.
The version on the website appears to be qfrm-0.2.0.23. Although it is older, it worked without error for me.
If you download the ...23 whl file and install that one (pip install [file_name].whl) you may find it works better.
I'm on Python version 2.7.11 and was unable to install qfrm version 0.2.0.27 and received the error message: No module named 'qfrm.Options'
However, I was able to install qfrm version 0.2.0.23, as follows: pip install -v qfrm==0.2.0.23