I am trying to make a line of code, that searches Wikipedia for information. Here's my code:
import wikipedia
print(wikipedia.summary("Wikipedia"))
I have used the same module in the past, with no problem. Now here comes the error. When I run this SIMPLE 2 lines of code, I get: Modulenotfounderror: No module named: "wikipedia"
Yes, I have tried pip install wikipedia, and pip3 install wikipedia and it says:
Requirement already satisfied: wikipedia in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (1.4.0)
Requirement already satisfied: beautifulsoup4 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from wikipedia) (4.10.0)
Requirement already satisfied: requests<3.0.0,>=2.0.0 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from wikipedia) (2.27.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (1.26.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (2.0.10)
Requirement already satisfied: soupsieve>1.2 in c:\users\dinoh\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from beautifulsoup4->wikipedia) (2.3.1)
I don't know what to do.
Alrighty, so the fix for my own question was that I needed to use the correct version of python. So I just installed a slightly older version of python (3.9) as I was using 3.10 currently, and then swapped the version of python I was using in vscode. Worked like a charm. If you're feeling lazy, you can also download the version you need off of the Microsoft store like I did. :)
Click here for image cause I don't have embed perms yet lol
Related
When I want to
from webdriver_manager.chrome import ChromeDriverManager
I get ModuleNotFoundError. I have uninstalled and installed again using pip3, and chekced the previous related questions here about the same matter, but still can't figure it out. Below are the installation details.
C:\Users\eywy0>pip3 install webdriver_manager
Requirement already satisfied: webdriver_manager in c:\users\eywy0\anaconda3\lib\site-packages (3.7.1)
Requirement already satisfied: requests in c:\users\eywy0\anaconda3\lib\site-packages (from webdriver_manager) (2.27.1)
Requirement already satisfied: python-dotenv in c:\users\eywy0\anaconda3\lib\site-packages (from webdriver_manager) (0.20.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (1.26.9)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (2021.10.8)
Any clue on what might have gone wrong? Thanks for any help!!
I am very new, all help much appreciated.
In trying to learn Python, I am repeatedly coming up with an issue I don't know how to solve.
Each time I try to call a module via the "import" function I am getting the following error message -
ModuleNotFoundError: No module named 'requests'
However, when I run the command line install prompt, I am told that the request is already satisfied (i.e. it should already be installed). I haven't saved anything in a bespoke location (or at least, I am not aware I have!).
C:\Users\chris>pip install requests
Requirement already satisfied: requests in c:\users\chris\appdata\local\programs\python\python39\lib\site-packages (2.25.1)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\chris\appdata\local\programs\python\python39\lib\site-packages (from requests) (4.0.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\chris\appdata\local\programs\python\python39\lib\site-packages (from requests) (1.26.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\chris\appdata\local\programs\python\python39\lib\site-packages (from requests) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\chris\appdata\local\programs\python\python39\lib\site-packages (from requests) (2020.12.5)
try this command
py -3.9 -m pip install requests
You can refer the official documentation https://docs.python.org/3/installing/
im having problem to use tweepy on vscode, it keep reporting a missing import of tweepy and i dont know why.
on power shell shows that requirement already satisfied, and i can see the tweepy on vscode if i search it, so what is going on ?
PS C:\Windows\System32> pip install tweepy
Requirement already satisfied: tweepy in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (4.5.0)
Requirement already satisfied: requests-oauthlib<2,>=1.0.0 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from tweepy) (1.3.0)
Requirement already satisfied: requests<3,>=2.27.0 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from tweepy) (2.27.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3,>=2.27.0->tweepy) (2.5)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3,>=2.27.0->tweepy) (1.26.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3,>=2.27.0->tweepy) (2.0.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests<3,>=2.27.0->tweepy) (2021.10.8)
Requirement already satisfied: oauthlib>=3.0.0 in c:\users\arthu\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from requests-oauthlib<2,>=1.0.0->tweepy) (3.1.1)
PS C:\Windows\System32>
i had the same problem in using tweepy in vs code
so just to be sure i installed tweepy by using pip install tweepy in shell terminal and
the terminal in vs code(just to be sure) and ubuntu as well after that i closed the vs code and then opened it again and it worked, hopefully it works with you
I'm using JupyterLab.
When importing some packages, or executing some functions from scikit-learn,
very long list of deprecation warnings fill the screen.
I googled about this problem and upgraded the packages (scikit-learn, numpy), but I still get the warnings.
pip install scikit-learn --upgrade
Requirement already satisfied: scikit-learn in c:\users\...\appdata\local\programs\python\python39\lib\site-packages (1.0.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\...\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn) (3.0.0)
Requirement already satisfied: joblib>=0.11 in c:\users\...\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn) (1.1.0)
Requirement already satisfied: numpy>=1.14.6 in c:\users\...\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn) (1.22.1)
Requirement already satisfied: scipy>=1.1.0 in c:\users\...\appdata\local\programs\python\python39\lib\site-packages (from scikit-learn) (1.7.2)
Some say that these are not problems because they are just warnings and not harmful.
But it's very annoying. How can I solve this problem?
I have been working on a program for a while now and never had this issue. I installed Kivy for a seperate program and then all of a sudden I get an error saying ModuleNotFoundError: No module named 'pandas' for my first program. I tried reinstalling it through CMD but it's already there.
C:\Users\xxxxx>python -m pip install pandas
Requirement already satisfied: pandas in c:\users\xxxxx\appdata\roaming\python\python37\site-packages (0.25.3)
Requirement already satisfied: python-dateutil>=2.6.1 in c:\users\xxxxx\appdata\roaming\python\python37\site-packages (from pandas) (2.8.0)
Requirement already satisfied: numpy>=1.13.3 in c:\users\xxxxx\appdata\roaming\python\python37\site-packages (from pandas) (1.16.4)
Requirement already satisfied: pytz>=2017.2 in c:\users\xxxxx\appdata\roaming\python\python37\site-packages (from pandas) (2019.1)
Requirement already satisfied: six>=1.5 in c:\users\xxxxx\appdata\roaming\python\python37\site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
I also tried uninstalling it and reinstalling it but nothing worked, I have no idea what's going on.
Check if kivy is installed properly and if it runs in virtual environment (ve), if so you should install required packages in your ve directly.
See also kivy's installation guide:
https://kivy.org/doc/stable/installation/installation-windows.html#installing-the-kivy-stable-release