Error while importing lime_tabular package - python

I am trying to install lime_tabular but this message occurs and I cannot solve it:
ERROR: Could not find a version that satisfies the requirement lime_tabular (from versions: none)
ERROR: No matching distribution found for lime_tabular
I have upgraded pip and downloaded lime successfully, the problem only with lime_tabular.

lime_tabular is a module in the lime package. After running pip install lime, import with:
from lime import lime_tabular

if you have a requirements.txt file in your project directory, check the version written there. Maybe the version mentioned there is not correct. Remove the version number from there. Try to install again using
pip install -r requirements.txt
OR
If this package is installing a dependency of another package installation. Try to Upgrade the versions as well.
OR
If any of the two solution doesn't fix your solution. What u can do is to check the current version of this package and install it directly in your virtual environment or your current environment. Using
pip install <package-name>
After manually installing all the dependency packages then install your desired package. \
After installing try to import using the correct syntax
from lime import lime_tabular
or
import lime.lime_tabular
or
self.explainer = lime.lime_tabular.LimeTabularExplainer() // like this
I hope you find it useful.

Related

Pip could not find a version that satisfies the requirement

I'm having problems with installing a package using pip. I tried :
pip install wx
Causing these errors :
ERROR: Could not find a version that satisfies the requirement wx (from versions: none)
ERROR: No matching distribution found for wx
I checked if pip was up to date which was the case. I'm on Python 3.10.6
Does anyone know a solution to this problem?
Try to specify an older version of wx, or if there is documentation on the package, read the requirements, maybe you need an older or newer version of python. Try also
pip install wxPython or https://pypi.org/project/wxPython/

unable a install pyspellcheck module on Linux(Raspbian)

so I am working on Linux(Raspbian) and I am unable to install the pyspellcheck module.
so previously I managed to install it by just
pip install pyspellcheck
but recently I had to factory reset my machine and I am not able to install pyspellcheck anymore.
I get the following error:
ERROR: Could not find a version that satisfies the requirement pyspellcheck (from versions: none)
ERROR: No matching distribution found for pyspellcheck
so I would just like to know how can I install it on my machine
NOTE:I am working on a Linux machine
There is no such a package at PyPI: https://pypi.org/project/pyspellcheck/ — error 404. What are you trying to install? Do you want pyspellchecker?
pip install pyspellchecker

Can't install rospy

I need to use rospy for my app, and when i try to install it via pip3 install rospy or pip3 install python-rospy it results an error: ERROR: Could not find a version that satisfies the requirement python-rospy (from versions: none) ERROR: No matching distribution found for python-rospy
I have no idea how to use it and where to download it
Thanks for any responces!
There could be multiple reasons behind these errors. I think you should first check if you have ROS1 installed on your system. Since you're going to use Python3, you'll have to install ROS1 Noetic. You can follow the instructions mentioned on http://wiki.ros.org/noetic/Installation/Ubuntu
If you already have ROS1 Noetic on your system, you should check if you've source ROS1 in your .bashrc. If source /opt/ros/neotic/setup.bash is already there, then something went wrong during the installation. You should install ROS again.
Hope this helps.

What would cause the packages/libraries in Spyder to be different from the ones when using pip?

This problem occurred when I was trying to import pandas:
df = pd.read_html('https://www.macrotrends.net/stocks/charts/BMO/Bank-of-Montreal/dividend-yield-history')
I got the error message:
raise ImportError("lxml not found, please install it")
ImportError: lxml not found, please install it
So then I pip lxml to install, same error.
then I pip3 lxml, same issue...
And this led me down a rabbit hole of installing and re-installing lxml, pandas, html5lib, html
and then deleting all of Python from my machine as well as Spyder, then re-installing everything and still having the same issue of that error "lxml not found..."
So then I did 'pip list' on command line, lxml and pandas and everything else I installed is there.
I found some code to find all the packages/libraries installed on Spyder using this:
import pkg_resources
dists = [str(d).replace(" ","==") for d in pkg_resources.working_set]
for i in dists:
print(i)
And I get:
runfile('C:/Users/Preston_Jarvis/untitled0.py', wdir='C:/Users/Preston_Jarvis')
zipp==3.4.1
yapf==0.31.0
wheel==0.36.2
webencodings==0.5.1
wcwidth==0.2.5
And so on...
Pandas is there, but lxml or html5lib or hmtl
What could be causing this?
Thank you
How did you install Spyder? Did you use the installer or install it with pip/conda? Where are you installing your packages - what environment?
It appears that the environment where you install packages with pip (e.g. lxml) is different than what Spyder is running with. See https://docs.spyder-ide.org/current/faq.html#using-existing-environment
Note that for Spyder to work with other environments you need to install spyder-kernels in this environment (e.g. pip install spyder-kernels)

Installing PyAutoGUI Error in pip.exe install pyautogui

I have been installing PyautoGui on my WIN10 PC. But I am getting the following error, i have been getting a lot of errors jut to get this far.
i have been reinstalling python so its destination folder is in C:\Python instead of C:\Users\Home\AppData\Local\Programs\Python\Python35-32 mabye thats why ? How do i fix this ?
C:\Python\Scripts>pip.exe install pyautogui Collecting pyautogui
Using cached PyAutoGUI-0.9.33.zip Collecting pymsgbox (from pyautogui)
Using cached PyMsgBox-1.0.3.zip Collecting PyTweening>=1.0.1 (from
pyautogui) Using cached PyTweening-1.0.3.zip Collecting Pillow (from
pyautogui) Using cached Pillow-3.3.1-cp35-cp35m-win32.whl Collecting
pyscreeze (from pyautogui) Using cached PyScreeze-0.1.8.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Home\AppData\Local\Temp\pip-build-kxm3249e\pyscreeze\setup.py",
line 6, in
version=import('pyscreeze').version,
File "c:\users\home\appdata\local\temp\pip-build-kxm3249e\pyscreeze\pyscreeze__init__.py",
line 21, in
from PIL import Image
ImportError: No module named 'PIL'
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\Home\AppData\Local\Temp\pip-build-kxm3249e\pyscreeze\
I encountered the same error message as you did. This workaround worked for me. Try these steps in order...
Install PyScreeze 0.1.7.
Update PyScreeze to 0.1.8.
Install PyAutoGui.
I hope this helps.
I also encountered the same error (albeit on Ubuntu 14.04). The missing module PIL is named Pillow (As said in this answer). So what I tried was (same in MacOS I think):
sudo pip3 install pillow
That translated to Windows would be:
pip.exe install pillow
Hope this helps you further.
Instead of letting PyautoGUI get all the packages for you.
Install all of them individually. Then, run the pip install --upgrade _packageName_
Then run pip install pyautogui.
Hope this helps.
I'm happy to report that this installation error has been fixed as of version 0.9.34. All you have to do is install or update PyAutoGUI from PyPI.
try
pip uninstall pyautogui
then
pip install pyautogui
There is a possibility that on windows it is not rightly configured on windows path and therefore it cant find the module, to fix this try:
Control Panel \ System and Security \ System
then click: Environment Variables, and double click on path and append the directory you want to use.
full explanation on: https://helpdeskgeek.com/windows-10/add-windows-path-environment-variable/
you can also try:
Cmd:
python -m pip install < module >
git clone https://github.com/USERNAME/REPOSITORY
or
To append to PYTHONPATH:
IDE:
import sys
sys.path.append('< path >')

Categories