I installed image-scraper using pip install ImageScraper.
If I do that again then this the output:
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. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: ImageScraper in ./Library/Python/2.7/lib/python/site-packages (2.0.7)
Requirement already satisfied: future>=0.14.3 in ./Library/Python/2.7/lib/python/site-packages (from ImageScraper) (0.18.2)
Requirement already satisfied: setproctitle>=1.1.8 in ./Library/Python/2.7/lib/python/site-packages (from ImageScraper) (1.1.10)
Requirement already satisfied: SimplePool in ./Library/Python/2.7/lib/python/site-packages (from ImageScraper) (0.1)
Requirement already satisfied: requests>=2.1.0 in /Library/Python/2.7/site-packages (from ImageScraper) (2.18.4)
Requirement already satisfied: lxml>=3.2.3 in ./Library/Python/2.7/lib/python/site-packages (from ImageScraper) (4.6.1)
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests>=2.1.0->ImageScraper) (2.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests>=2.1.0->ImageScraper) (3.0.4)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests>=2.1.0->ImageScraper) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests>=2.1.0->ImageScraper) (2017.11.5)
But when I do:
image-scraper -h
I get:
-bash: image-scraper: command not found.
What can I do?
Related
I just installed locust with pip install locust, it was installed at ~/.local/lib/python3.8/site-packages.
The problem is if I try to get the version of it with locust -V i get a permission denied error.
> which locust
locust not found
> type locust
locust not found
> locust
zsh: permission denied: locust
~/.local/lib/python3.8/site-packages is in the PATH
ls -lF $(which locust) and head -1 $(which locust) has no result since which locust cannot find it.
If reinstalling:
❯ pip install locust
Requirement already satisfied: locust in /home/marcosdipaolo/.local/lib/python3.8/site-packages (2.5.0)
Requirement already satisfied: requests>=2.9.1 in /usr/lib/python3/dist-packages (from locust) (2.22.0)
Requirement already satisfied: psutil>=5.6.7 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (5.8.0)
Requirement already satisfied: Flask-Cors>=3.0.10 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (3.0.10)
Requirement already satisfied: Flask-BasicAuth>=0.2.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (0.2.0)
Requirement already satisfied: msgpack>=0.6.2 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (1.0.3)
Requirement already satisfied: geventhttpclient>=1.5.1 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (1.5.3)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (4.0.1)
Requirement already satisfied: pyzmq>=22.2.1 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (22.3.0)
Requirement already satisfied: flask>=2.0.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (2.0.2)
Requirement already satisfied: ConfigArgParse>=1.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (1.5.3)
Requirement already satisfied: roundrobin>=0.0.2 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (0.0.2)
Requirement already satisfied: gevent>=20.9.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (21.8.0)
Requirement already satisfied: Werkzeug>=2.0.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (2.0.2)
Requirement already satisfied: Six in /usr/lib/python3/dist-packages (from Flask-Cors>=3.0.10->locust) (1.14.0)
Requirement already satisfied: brotli in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from geventhttpclient>=1.5.1->locust) (1.0.9)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from geventhttpclient>=1.5.1->locust) (2019.11.28)
Requirement already satisfied: click>=7.1.2 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from flask>=2.0.0->locust) (8.0.3)
Requirement already satisfied: Jinja2>=3.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from flask>=2.0.0->locust) (3.0.3)
Requirement already satisfied: itsdangerous>=2.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from flask>=2.0.0->locust) (2.0.1)
Requirement already satisfied: zope.interface in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from gevent>=20.9.0->locust) (5.4.0)
Requirement already satisfied: zope.event in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from gevent>=20.9.0->locust) (4.5.0)
Requirement already satisfied: greenlet<2.0,>=1.1.0; platform_python_implementation == "CPython" in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from gevent>=20.9.0->locust) (1.1.2)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from gevent>=20.9.0->locust) (45.2.0)
Requirement already satisfied: MarkupSafe>=2.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from Jinja2>=3.0->flask>=2.0.0->locust) (2.0.1)
Thanks a lot for your help.
Problem is locust command is installed at ~/.local/bin/locust, and that wasn't in the path.
~/.local/lib/python3.8/site-packages should not be on your path.
I think the problem is that zsh finds the locust package folder (at ~/.local/lib/python3.8/site-packages/locust/) and tries to execute it.
pip should install locust as a command (at for example /usr/local/bin/locust). Try reinstalling and check for any errors while installing, as pip should log a warning if it was installed somewhere that isn't in your path.
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'm trying to install Google Cloud's Video Intelligence library for Python.
However, when I run the command:
pip install --upgrade google-cloud-videointelligence
I get the following error:
(video_labeler) PS C:\path> pip install google-cloud-videointelligence
Collecting google-cloud-videointelligence
Using cached https://files.pythonhosted.org/packages/f0/32/4518904fb73fa8264c6e827df6c062e3c62b0a6dc7eb34a35b7e60d3ed93/google_cloud_videointelligence-1.11.0-py2.py3-none-any.whl
Requirement already satisfied: google-api-core[grpc]<2.0.0dev,>=1.14.0 in c:\path\lib\site-packages (from google-cloud-videointelligence) (1.14.3)
Requirement already satisfied: six>=1.10.0 in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (1.12.0)
Requirement already satisfied: protobuf>=3.4.0 in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (3.10.0)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (2.22.0)
Requirement already satisfied: pytz in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (2019.3)
Requirement already satisfied: setuptools>=34.0.0 in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (40.8.0)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.6.0 in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (1.6.0)
Requirement already satisfied: google-auth<2.0dev,>=0.4.0 in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (1.6.3)
Requirement already satisfied: grpcio<2.0dev,>=1.8.2; extra == "grpc" in c:\path\lib\site-packages (from google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (1.24.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\path\lib\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (1.25.6)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\path\lib\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\path\lib\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (2019.9.11)
Requirement already satisfied: idna<2.9,>=2.5 in c:\path\lib\site-packages (from requests<3.0.0dev,>=2.18.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (2.8)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\path\lib\site-packages (from google-auth<2.0dev,>=0.4.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (0.2.7)
Requirement already satisfied: cachetools>=2.0.0 in c:\path\lib\site-packages (from google-auth<2.0dev,>=0.4.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (3.1.1)
Requirement already satisfied: rsa>=3.1.4 in c:\path\lib\site-packages (from google-auth<2.0dev,>=0.4.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (4.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\path\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=0.4.0->google-api-core[grpc]<2.0.0dev,>=1.14.0->google-cloud-videointelligence) (0.4.7)
Installing collected packages: google-cloud-videointelligence
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\\path\\Lib\\site-packages\\google\\cloud\\videointelligence_v1p1beta1\\gapic\\transports\\__pycache__\\video_intelligence_service_grpc_transport.cpython-37.pyc'
This is being run in a virtualenv based on Python 3.7.
Help to fixing this will be greatly appreciated.
try installing in a virtualenv
Mac/Linux
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-videointelligence
Windows
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-videointelligence
I am trying to use locust in ec2 instance for load testing of my project. So, I have installed locust using this command:
python -m pip install locustio
I got this below response:
Requirement already satisfied: locust in /usr/local/lib/python2.7/site-packages (0.0)
Requirement already satisfied: locustio in /usr/local/lib/python2.7/site-packages (from locust) (0.9.0)
Requirement already satisfied: six>=1.10.0 in /usr/local/lib/python2.7/site-packages (from locustio->locust) (1.11.0)
Requirement already satisfied: msgpack>=0.4.2 in /usr/local/lib64/python2.7/site-packages (from locustio->locust) (0.5.6)
Requirement already satisfied: requests>=2.9.1 in /usr/local/lib/python2.7/site-packages (from locustio->locust) (2.19.1)
Requirement already satisfied: gevent>=1.2.2 in /usr/local/lib64/python2.7/site-packages (from locustio->locust) (1.3.6)
Requirement already satisfied: pyzmq>=16.0.2 in /usr/local/lib64/python2.7/site-packages (from locustio->locust) (17.1.2)
Requirement already satisfied: flask>=0.10.1 in /usr/local/lib64/python2.7/site-packages (from locustio->locust) (1.0.2)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/site-packages (from requests>=2.9.1->locustio->locust) (3.0.4)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /usr/local/lib/python2.7/site-packages (from requests>=2.9.1->locustio->locust) (1.23)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/site-packages (from requests>=2.9.1->locustio->locust) (2018.8.24)
Requirement already satisfied: idna<2.8,>=2.5 in /usr/local/lib/python2.7/site-packages (from requests>=2.9.1->locustio->locust) (2.6)
Requirement already satisfied: greenlet>=0.4.14; platform_python_implementation == "CPython" in /usr/local/lib64/python2.7/site-packages (from gevent>=1.2.2->locustio->locust) (0.4.15)
Requirement already satisfied: itsdangerous>=0.24 in /usr/local/lib/python2.7/site-packages (from flask>=0.10.1->locustio->locust) (0.24)
Requirement already satisfied: Jinja2>=2.10 in /usr/local/lib/python2.7/site-packages (from flask>=0.10.1->locustio->locust) (2.10)
Requirement already satisfied: Werkzeug>=0.14 in /usr/local/lib/python2.7/site-packages (from flask>=0.10.1->locustio->locust) (0.14.1)
Requirement already satisfied: click>=5.1 in /usr/local/lib64/python2.7/site-packages (from flask>=0.10.1->locustio->locust) (7.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/site-packages (from Jinja2>=2.10->flask>=0.10.1->locustio->locust) (1.0)
I was thinking, locust is already installed. But when I execute my python script to start the server, it says below:
bash: locust: command not found
Can anyone please help me understand what's going wrong here? Thanks in advance.
ec2 instances don't necessarily install things in the usual directories.
I'd suggest running a command like:
find / -name locust 2>/dev/null
This will show you where locust has been installed (possible somewhere like /home/{user}/.local/bin)
Add this to your path (or whatever directory you found in the command above):
export PATH=$PATH:/home/{user}/.local/bin
After that your shell should be able to find the command.