I have installed telethon using the following code:
sudo pip3 install telethon
I tried to reinstall it and get the following message:
Requirement already satisfied: pyasn1>=0.1.3 in /usr/local/lib/python3.7/site-packages (from rsa->telethon) (0.4.5)
But when i use it in my code:
from telethon import TelegramClient
It shows the following error:
ModuleNotFoundError: No module named 'telethon'
Where should i look to rectify this error ?
You probably have both Python 2 and Python 3 installed. Just like you do pip3, you should do python3 and not python alone.
Related
I'm trying to create a Twitter bot but when I install the tweepy package it gives me the following error:
ModuleNotFoundError: No module named 'tweepy'
I've tried uninstalling and installing tweepy and it still doesn't work. i'm running python 3.9.2
Found a solution: just type pip install tweepy in to the terminal next to the console
When i try to run my script, which is just those two lines:
from pytube import YouTube
YouTube('http://youtube.com/watch?v=9bZkp7q19f0').streams.first().download()
i get the error:
ImportError: cannot import name 'YouTube' from 'pytube' (unknown location)
ive used the following documentation to install pytube:
https://github.com/NFicano/pytube
but since i am using python3.8 i installed pytube3 using:
pip3 install pytube3
instead of:
pip install pytube
which does not throw errors from the module.
When double check if there is a "pytube" module directory in:
C:\Users\User\AppData\Local\Programs\Python\Python38\Lib\site-packages
if found the directory: "\pytube" inside of it
when i use: pip install pytube3
i get the output:
Requirement already satisfied: pytube3 in c:\users\User\appdata\local\programs\python\python38\lib\site-packages (9.6.4)
Requirement already satisfied: typing-extensions in c:\users\User\appdata\local\programs\python\python38\lib\site-packages (from pytube3) (3.7.4.2)
pip uninstall pytube3
pip install pytube3
Step 2 returns the filepath where pytube3 was installed. go to the folder that was returned, open "pytube/", and clear the contents of the "pycache" folder, which has all the ".pyc" files. These are not important and can be regenerated by the package whenever it is loaded.
If all of that doesn't work try doing the following pip install pytube3 --upgrade
use this:- it works for me after upgrade your pytube
pip install pytube3 --upgrade
import pytube
myVideo = pytube.YouTube('youtube's video url')
I am trying to follow the example available in
https://github.com/dwallach1/Qualtrics_API
Once I do the following
!pip install Qualtrics
It gives me the following
ERROR: Could not find a version that satisfies the requirement Qualtrics (from versions: none)
ERROR: No matching distribution found for Qualtrics
Then I follow the webpage provided
import Qualtrics
It gives me
ModuleNotFoundError: No module named 'Qualtrics'
Have anyone tried it before?
You should be importing this file
https://github.com/dwallach1/Qualtrics_API/blob/master/src/qualtrics.py
and you should not be installing it from pip
If you want to use a pip package, do have the python package below, check it out!
pip install py-qualtrics-api
https://pypi.org/project/py-qualtrics-api/
I have installed xmltodict successfully using the below command
python -m pip install --upgrade --user xmltodict
But when I am executing a python script which contains import xmltodict I am getting the below error
import xmltodict
ModuleNotFoundError: No module named 'xmltodict'
Can some please help me to fix this?
I encountered the same problem in pip 18.1. try to upgrade the pip first, uninstall and reinstall the xmltodict module.
I'm using Python 3 on macOS and got the following error message:
ModuleNotFoundError: No module named 'selenium'
I had tried with pip3 install selenium but it didn't work.