I have an issue with pywhatkit:
code:
import pywhatkit
pywhatkit.sendwhatmsg("+39123456789", "Hi", 6, 13)
Result:
Traceback (most recent call last):
File "C:\Users\angelo\Desktop\whatsapp.py", line 1, in
import pywhatkit
File "C:\Users\angelo\AppData\Local\Programs\Python\Python310\lib\site-packages\pywhatkit_init_.py", line 29, in
from pywhatkit.remotekit import start_server
File "C:\Users\angelo\AppData\Local\Programs\Python\Python310\lib\site-packages\pywhatkit\remotekit.py", line 6, in
from flask import Flask, request
ImportError: cannot import name 'Flask' from 'flask' (unknown location)
Installation 1:
pip install pywhatkit.py
ERROR: Could not find a version that satisfies the requirement pywhatkit.py (from versions: none)
ERROR: No matching distribution found for pywhatkit.py
Installation 2:
py -m pip install pywhatkit
Requirement already satisfied: pywhatkit in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (5.3)
Requirement already satisfied: requests in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pywhatkit) (2.28.0)
Requirement already satisfied: wikipedia in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pywhatkit) (1.4.0)
Requirement already satisfied: pyautogui in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pywhatkit) (0.9.53)
Requirement already satisfied: Pillow in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pywhatkit) (9.1.1)
Requirement already satisfied: pymsgbox in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pyautogui->pywhatkit) (1.0.9)
Requirement already satisfied: PyTweening>=1.0.1 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pyautogui->pywhatkit) (1.0.4)
Requirement already satisfied: pyscreeze>=0.1.21 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pyautogui->pywhatkit) (0.1.28)
Requirement already satisfied: pygetwindow>=0.0.5 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pyautogui->pywhatkit) (0.0.9)
Requirement already satisfied: mouseinfo in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pyautogui->pywhatkit) (0.1.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from requests->pywhatkit) (2022.6.15)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from requests->pywhatkit) (2.0.12)
Requirement already satisfied: idna<4,>=2.5 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from requests->pywhatkit) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from requests->pywhatkit) (1.26.9)
Requirement already satisfied: beautifulsoup4 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from wikipedia->pywhatkit) (4.11.1)
Requirement already satisfied: pyrect in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from pygetwindow>=0.0.5->pyautogui->pywhatkit) (0.2.0)
Requirement already satisfied: soupsieve>1.2 in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from beautifulsoup4->wikipedia->pywhatkit) (2.3.2.post1)
Requirement already satisfied: pyperclip in c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages (from mouseinfo->pyautogui->pywhatkit) (1.8.2)
Path:
C:\Users\angelo\AppData\Local\Programs\Python\Python310\Scripts;C:\Users\angelo\AppData\Local\Programs\Python\Python310;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;%USERPROFILE%.dotnet\tools;c:\users\angelo\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages;c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages;
C:\Users\angelo\AppData\Local\Programs\Python\Python310\
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
%USERPROFILE%.dotnet\tools
c:\users\angelo\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages\
c:\users\angelo\appdata\local\programs\python\python310\lib\site-packages\
Any ideas?
Thank you for your help
Angelo
I solved with this line:
python -m install flask
Now it works.
Angelo
Related
I'm trying to get the 8bit quantised bloom models running on my machine.
I (seem to have) installed all of the dependencies, however, when I run my script, it errors - saying it can't find the cudaGetRuntime
I then tried switching to to conda environemnt - using conda activate (and conda install cudatoolkit)
and it says it cant find "bitsandbytes"
root#localhost:~# pip install bitsandbytes accelerate transformers
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Requirement already satisfied: bitsandbytes in /usr/local/lib/python3.10/dist-packages (0.35.4)
Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.15.0)
Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.25.1)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (21.3)
Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.4)
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (from accelerate) (5.4.1)
Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from accelerate) (1.23.4)
Requirement already satisfied: torch>=1.4.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (1.13.0)
Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers) (4.64.1)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from transformers) (2.27.1)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.8.2)
Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.13.2)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (2022.10.31)
Requirement already satisfied: huggingface-hub<1.0,>=0.10.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.11.1)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.10.0->transformers) (4.4.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/lib/python3/dist-packages (from packaging>=20.0->accelerate) (3.0.7)
Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99 in /usr/local/lib/python3.10/dist-packages (from torch>=1.4.0->accelerate) (11.7.99)
Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66 in /usr/local/lib/python3.10/dist-packages (from torch>=1.4.0->accelerate) (11.10.3.66)
Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99 in /usr/local/lib/python3.10/dist-packages (from torch>=1.4.0->accelerate) (11.7.99)
Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96 in /usr/local/lib/python3.10/dist-packages (from torch>=1.4.0->accelerate) (8.5.0.96)
Requirement already satisfied: wheel in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.4.0->accelerate) (0.38.4)
Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch>=1.4.0->accelerate) (65.5.1)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root#localhost:~# python /tmp/pycharm_project_354/bloom8.py
File "/tmp/pycharm_project_354/bloom8.py", line 6, in <module>
from bitsandbytes.functional import quantize_blockwise, dequantize_blockwise
ModuleNotFoundError: No module named 'bitsandbytes'
Hi I've installed Alpha Vantage I'm getting an error when importing alpha_vantage into my Anaconda project:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_18576/239330141.py in <module>
----> 1 from aplha_vantage import TimeSeries
ModuleNotFoundError: No module named 'aplha_vantage'
Here's how I've installed it:
(base) C:\Users\audac>cd Documents/trading/code
(base) C:\Users\audac\Documents\trading\code>cd stock-scanner-py
(base) C:\Users\audac\Documents\trading\code\stock-scanner-py>cd algorithmic-trading-python
(base) C:\Users\audac\Documents\trading\code\stock-scanner-py\algorithmic-trading-python>pip install alpha_vantage
Requirement already satisfied: alpha_vantage in c:\users\audac\anaconda3\lib\site-packages (2.3.1)
Requirement already satisfied: requests in c:\users\audac\anaconda3\lib\site-packages (from alpha_vantage) (2.26.0)
Requirement already satisfied: aiohttp in c:\users\audac\anaconda3\lib\site-packages (from alpha_vantage) (3.8.1)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (2.0.4)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (6.0.1)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (1.3.0)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (1.7.2)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (1.2.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (4.0.2)
Requirement already satisfied: attrs>=17.3.0 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (21.2.0)
Requirement already satisfied: idna>=2.0 in c:\users\audac\anaconda3\lib\site-packages (from yarl<2.0,>=1.0->aiohttp->alpha_vantage) (3.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\audac\anaconda3\lib\site-packages (from requests->alpha_vantage) (1.26.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\audac\anaconda3\lib\site-packages (from requests->alpha_vantage) (2021.10.8)
(base) C:\Users\audac\Documents\trading\code\stock-scanner-py\algorithmic-trading-python>
I've also tried uninstalling Python and all packages + reinstalling them but I still have the same issue. It only happens with the Alpha Vantage package, everything else works fine.
What am I doing wrong?
Spelling error:
aplha_vantage --> alpha_vantage
i.e.
from alpha_vantage import TimeSeries
I was using the adbutils package without any trouble. I restarted my pc and it doesn't work anymore. I get the error "No module named 'adbutils'". Which is very weird because it worked earlier and I am sure it is installed, I can straight up see the folder in my directory. Pip uninstalling and installing didn't work as well. I did get a lot of requirement not statisfied errors when reinstalling it. Other packages that are installed in the same directory do work without a problem. If anyone know why this is please let me know. Thank you
File "c:/Users/marti_wfv2bf9/Desktop/Python Projects/ADB testing/adb-testing.py", line 2, in <module>
import adbutils
ModuleNotFoundError: No module named 'adbutils'
PS C:\Users\marti_wfv2bf9\Desktop\Python Projects\ADB testing>
This is what I get when I try to reinstall it with pip3
pip3 install adbutils
Collecting adbutils
Using cached adbutils-0.8.1-py3-none-win_amd64.whl (1.4 MB)
Requirement already satisfied: apkutils2<2.0,>=1.0.0 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from adbutils) (1.0.0)
Requirement already satisfied: whichcraft in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from adbutils) (0.6.1)
Requirement already satisfied: requests in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from adbutils) (2.23.0)
Requirement already satisfied: six in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from adbutils) (1.14.0)
Requirement already satisfied: deprecation<3.0,>=2.0.6 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from adbutils) (2.1.0)
Requirement already satisfied: retry>=0.9 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from adbutils) (0.9.2)
Requirement already satisfied: pyelftools in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from apkutils2<2.0,>=1.0.0->adbutils) (0.26)
Requirement already satisfied: cigam in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from apkutils2<2.0,>=1.0.0->adbutils) (0.0.3)
Requirement already satisfied: xmltodict in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from apkutils2<2.0,>=1.0.0->adbutils) (0.12.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests->adbutils) (2020.4.5.1)
Requirement already satisfied: idna<3,>=2.5 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests->adbutils) (2.9)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests->adbutils) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests->adbutils) (1.25.8)
Requirement already satisfied: packaging in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from deprecation<3.0,>=2.0.6->adbutils) (20.4)
Requirement already satisfied: decorator>=3.4.2 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from retry>=0.9->adbutils) (4.4.2)
Requirement already satisfied: py<2.0.0,>=1.4.26 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from retry>=0.9->adbutils) (1.8.1)
Requirement already satisfied: pyparsing>=2.0.2 in c:\users\marti_wfv2bf9\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from packaging->deprecation<3.0,>=2.0.6->adbutils) (2.4.7)
Installing collected packages: adbutils
Successfully installed adbutils-0.8.1
I'm trying to use Backblaze/b2-sdk-python. I think I managed to install it by just doing pip install b2sdk
$ pip install b2sdk
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: b2sdk in /Library/Python/2.7/site-packages (0.1.8)
Requirement already satisfied: futures>=3.0.5; python_version < "3.2" in /Library/Python/2.7/site-packages (from b2sdk) (3.3.0)
Requirement already satisfied: arrow<0.13.1,>=0.8.0 in /Library/Python/2.7/site-packages (from b2sdk) (0.13.0)
Requirement already satisfied: six>=1.10 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from b2sdk) (1.12.0)
Requirement already satisfied: logfury>=0.1.2 in /Library/Python/2.7/site-packages (from b2sdk) (0.1.2)
Requirement already satisfied: enum34>=1.1.6; python_version < "3.4" in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from b2sdk) (1.1.6)
Requirement already satisfied: setuptools in /Library/Python/2.7/site-packages (from b2sdk) (44.0.0)
Requirement already satisfied: tqdm>=4.5.0 in /Library/Python/2.7/site-packages (from b2sdk) (4.43.0)
Requirement already satisfied: requests>=2.9.1 in /Library/Python/2.7/site-packages (from b2sdk) (2.23.0)
Requirement already satisfied: backports.functools-lru-cache>=1.2.1; python_version == "2.7" in /Library/Python/2.7/site-packages (from arrow<0.13.1,>=0.8.0->b2sdk) (1.6.1)
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from arrow<0.13.1,>=0.8.0->b2sdk) (1.5)
Requirement already satisfied: funcsigs in /Library/Python/2.7/site-packages (from logfury>=0.1.2->b2sdk) (1.0.2)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Library/Python/2.7/site-packages (from requests>=2.9.1->b2sdk) (1.25.8)
Requirement already satisfied: idna<3,>=2.5 in /Library/Python/2.7/site-packages (from requests>=2.9.1->b2sdk) (2.9)
Requirement already satisfied: chardet<4,>=3.0.2 in /Library/Python/2.7/site-packages (from requests>=2.9.1->b2sdk) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests>=2.9.1->b2sdk) (2019.11.28)
But following the Quick Start Guide after I do
>>> from b2sdk.v1 import *
Then I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named v1
May I ask what is going on?
I'm using Python 2.7.16 on macOS.
I get this error when I try to call a geospark module
from geospark.register import GeoSparkRegistrator
ModuleNotFoundError: No module named 'geospark'
However if I do
pip install geospark
I get
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: geospark in /usr/local/lib/python3.6/dist-packages (1.3.0)
Requirement already satisfied: pyspark in /usr/local/lib/python3.6/dist-packages (from geospark) (2.4.5)
Requirement already satisfied: shapely in /usr/local/lib/python3.6/dist-packages (from geospark) (1.7.0)
Requirement already satisfied: findspark in /usr/local/lib/python3.6/dist-packages (from geospark) (1.3.0)
Requirement already satisfied: attrs in /usr/local/lib/python3.6/dist-packages (from geospark) (19.3.0)
Requirement already satisfied: py4j==0.10.7 in /usr/local/lib/python3.6/dist-packages (from pyspark->geospark) (0.10.7)