Importing translate from google.cloud - python

I am trying to do translate a document with google translate from the package google.cloud
I already did:
pip install google.cloud
and the result was:
Collecting google.cloud
Using cached google_cloud-0.27.0-py2.py3-none-any.whl
Requirement already satisfied: google-cloud-logging<1.3dev,>=1.2.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-bigtable<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-datastore<1.3dev,>=1.2.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-error-reporting<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-pubsub<0.28dev,>=0.27.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-core<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-storage<1.4dev,>=1.3.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-resource-manager<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-language<0.28dev,>=0.27.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-translate<1.2dev,>=1.1.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-speech<0.29dev,>=0.28.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-videointelligence<0.26dev,>=0.25.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-monitoring<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-spanner<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-runtimeconfig<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-vision<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-dns<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: google-cloud-bigquery<0.27dev,>=0.26.0 in c:\anaconda\lib\site-packages (from google.cloud)
Requirement already satisfied: gapic-google-cloud-logging-v2<0.92dev,>=0.91.0 in c:\anaconda\lib\site-packages (from google-cloud-logging<1.3dev,>=1.2.0->google.cloud)
Requirement already satisfied: grpcio<2.0dev,>=1.2.0 in c:\anaconda\lib\site-packages (from google-cloud-logging<1.3dev,>=1.2.0->google.cloud)
Requirement already satisfied: google-gax<0.16dev,>=0.15.7 in c:\anaconda\lib\site-packages (from google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: gapic-google-cloud-datastore-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-datastore<1.3dev,>=1.2.0->google.cloud)
Requirement already satisfied: gapic-google-cloud-error-reporting-v1beta1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-error-reporting<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: gapic-google-cloud-pubsub-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-pubsub<0.28dev,>=0.27.0->google.cloud)
Requirement already satisfied: protobuf>=3.0.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: tenacity<5.0.0dev,>=4.0.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: requests<3.0.0dev,>=2.4.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: google-auth<2.0.0dev,>=0.4.0 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: googleapis-common-protos>=1.3.4 in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: six in c:\anaconda\lib\site-packages (from google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: google-resumable-media>=0.2.3 in c:\anaconda\lib\site-packages (from google-cloud-storage<1.4dev,>=1.3.0->google.cloud)
Requirement already satisfied: gapic-google-cloud-spanner-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-spanner<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: gapic-google-cloud-spanner-admin-database-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-spanner<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: gapic-google-cloud-spanner-admin-instance-v1<0.16dev,>=0.15.0 in c:\anaconda\lib\site-packages (from google-cloud-spanner<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: proto-google-cloud-logging-v2[grpc]<0.92dev,>=0.91.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-logging-v2<0.92dev,>=0.91.0->google-cloud-logging<1.3dev,>=1.2.0->google.cloud)
Requirement already satisfied: oauth2client<4.0dev,>=2.0.0 in c:\anaconda\lib\site-packages (from gapic-google-cloud-logging-v2<0.92dev,>=0.91.0->google-cloud-logging<1.3dev,>=1.2.0->google.cloud)
Requirement already satisfied: dill<0.3dev,>=0.2.5 in c:\anaconda\lib\site-packages (from google-gax<0.16dev,>=0.15.7->google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: ply==3.8 in c:\anaconda\lib\site-packages (from google-gax<0.16dev,>=0.15.7->google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: future<0.17dev,>=0.16.0 in c:\anaconda\lib\site-packages (from google-gax<0.16dev,>=0.15.7->google-cloud-bigtable<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: proto-google-cloud-datastore-v1[grpc]<0.91dev,>=0.90.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-datastore-v1<0.16dev,>=0.15.0->google-cloud-datastore<1.3dev,>=1.2.0->google.cloud)
Requirement already satisfied: proto-google-cloud-error-reporting-v1beta1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-error-reporting-v1beta1<0.16dev,>=0.15.0->google-cloud-error-reporting<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: proto-google-cloud-pubsub-v1[grpc]<0.16dev,>=0.15.4 in c:\anaconda\lib\site-packages (from gapic-google-cloud-pubsub-v1<0.16dev,>=0.15.0->google-cloud-pubsub<0.28dev,>=0.27.0->google.cloud)
Requirement already satisfied: grpc-google-iam-v1<0.12dev,>=0.11.1 in c:\anaconda\lib\site-packages (from gapic-google-cloud-pubsub-v1<0.16dev,>=0.15.0->google-cloud-pubsub<0.28dev,>=0.27.0->google.cloud)
Requirement already satisfied: setuptools in c:\anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg (from protobuf>=3.0.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: monotonic>=0.6 in c:\anaconda\lib\site-packages (from tenacity<5.0.0dev,>=4.0.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: cachetools>=2.0.0 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: rsa>=3.1.4 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: pyasn1-modules>=0.0.5 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: pyasn1>=0.1.7 in c:\anaconda\lib\site-packages (from google-auth<2.0.0dev,>=0.4.0->google-cloud-core<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: proto-google-cloud-spanner-v1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-spanner-v1<0.16dev,>=0.15.0->google-cloud-spanner<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: proto-google-cloud-spanner-admin-database-v1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-spanner-admin-database-v1<0.16dev,>=0.15.0->google-cloud-spanner<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: proto-google-cloud-spanner-admin-instance-v1[grpc]<0.16dev,>=0.15.3 in c:\anaconda\lib\site-packages (from gapic-google-cloud-spanner-admin-instance-v1<0.16dev,>=0.15.0->google-cloud-spanner<0.27dev,>=0.26.0->google.cloud)
Requirement already satisfied: httplib2>=0.9.1 in c:\anaconda\lib\site-packages (from oauth2client<4.0dev,>=2.0.0->gapic-google-cloud-logging-v2<0.92dev,>=0.91.0->google-cloud-logging<1.3dev,>=1.2.0->google.cloud)
Installing collected packages: google.cloud
Successfully installed google.
then I called the package in Spyder (Python 3.5):
import google.cloud
from google.cloud import translate
I obtained this error:
>Traceback (most recent call last):
> File "<ipython-input-7-03a1edda6e65>", line 2, in <module>
from google.cloud import translate
> File "C:\Anaconda\lib\site-packages\google\cloud\translate.py", line 18, in <module>
from google.cloud.translate_v2 import __version__
> File "C:\Anaconda\lib\site-packages\google\cloud\translate_v2\__init__.py", line 19, in <module>
__version__ = get_distribution('google-cloud-translate').version
> File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 535, in get_distribution
dist = get_provider(dist)
> File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 415, in get_provider
return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
> File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 943, in require
needed = self.resolve(parse_requirements(requirements))
> File "C:\Anaconda\lib\site-packages\setuptools-23.0.0-py3.5.egg\pkg_resources\__init__.py", line 834, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
>ContextualVersionConflict: (pyasn1 0.1.9 (c:\anaconda\lib\site-packages), Requirement.parse('pyasn1==0.3.3'), {'pyasn1-modules'})

I realized it works by:
pip install google-cloud-translate

Related

Can't run quantised models on machine

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'

Jupyter Notebook not running

I've tried installing Jupyter Notebook and it says for everything "Requirement already Satisfied"
Requirement already satisfied: nbconvert in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter) (7.2.7)
Requirement already satisfied: jupyter-console in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter) (6.4.4)
Requirement already satisfied: notebook in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter) (6.5.2)
Requirement already satisfied: ipywidgets in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter) (8.0.4)
Requirement already satisfied: ipykernel in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter) (6.19.4)
Requirement already satisfied: qtconsole in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter) (5.4.0)
Requirement already satisfied: debugpy>=1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (1.6.4)
Requirement already satisfied: ipython>=7.23.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (8.7.0)
Requirement already satisfied: comm>=0.1.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (0.1.2)
Requirement already satisfied: packaging in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (22.0)
Requirement already satisfied: pyzmq>=17 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (24.0.1)
Requirement already satisfied: matplotlib-inline>=0.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (0.1.6)
Requirement already satisfied: tornado>=6.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (6.2)
Requirement already satisfied: psutil in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (5.9.4)
Requirement already satisfied: nest-asyncio in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (1.5.6)
Requirement already satisfied: traitlets>=5.4.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (5.8.0)
Requirement already satisfied: jupyter-client>=6.1.12 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipykernel->jupyter) (7.4.8)
Requirement already satisfied: widgetsnbextension~=4.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipywidgets->jupyter) (4.0.5)
Requirement already satisfied: jupyterlab-widgets~=3.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipywidgets->jupyter) (3.0.5)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-console->jupyter) (3.0.36)
Requirement already satisfied: pygments in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-console->jupyter) (2.13.0)
Requirement already satisfied: beautifulsoup4 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (4.11.1)
Requirement already satisfied: mistune<3,>=2.0.3 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (2.0.4)
Requirement already satisfied: nbformat>=5.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (5.7.1)
Requirement already satisfied: bleach in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (5.0.1)
Requirement already satisfied: jinja2>=3.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (3.1.2)
Requirement already satisfied: jupyter-core>=4.7 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (5.1.1)
Requirement already satisfied: markupsafe>=2.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (2.1.1)
Requirement already satisfied: nbclient>=0.5.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (0.7.2)
Requirement already satisfied: pandocfilters>=1.4.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (1.5.0)
Requirement already satisfied: jupyterlab-pygments in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (0.2.2)
Requirement already satisfied: tinycss2 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (1.2.1)
Requirement already satisfied: defusedxml in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbconvert->jupyter) (0.7.1)
Requirement already satisfied: argon2-cffi in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from notebook->jupyter) (21.3.0)
Requirement already satisfied: Send2Trash>=1.8.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from notebook->jupyter) (1.8.0)
Requirement already satisfied: nbclassic>=0.4.7 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from notebook->jupyter) (0.4.8)
Requirement already satisfied: terminado>=0.8.3 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from notebook->jupyter) (0.17.1)
Requirement already satisfied: prometheus-client in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from notebook->jupyter) (0.15.0)
Requirement already satisfied: ipython-genutils in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from notebook->jupyter) (0.2.0)
Requirement already satisfied: qtpy>=2.0.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from qtconsole->jupyter) (2.3.0)
Requirement already satisfied: decorator in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (5.1.1)
Requirement already satisfied: backcall in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.2.0)
Requirement already satisfied: colorama in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.4.6)
Requirement already satisfied: pickleshare in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.7.5)
Requirement already satisfied: jedi>=0.16 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.18.2)
Requirement already satisfied: stack-data in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from ipython>=7.23.1->ipykernel->jupyter) (0.6.2)
Requirement already satisfied: entrypoints in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-client>=6.1.12->ipykernel->jupyter) (0.4)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-client>=6.1.12->ipykernel->jupyter) (2.8.2)
Requirement already satisfied: pywin32>=1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-core>=4.7->nbconvert->jupyter) (305)
Requirement already satisfied: platformdirs>=2.5 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-core>=4.7->nbconvert->jupyter) (2.6.0)
Requirement already satisfied: notebook-shim>=0.1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbclassic>=0.4.7->notebook->jupyter) (0.2.2)
Requirement already satisfied: jupyter-server>=1.8 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbclassic>=0.4.7->notebook->jupyter) (2.0.4)
Requirement already satisfied: jsonschema>=2.6 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbformat>=5.1->nbconvert->jupyter) (4.17.3)
Requirement already satisfied: fastjsonschema in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from nbformat>=5.1->nbconvert->jupyter) (2.16.2)
Requirement already satisfied: wcwidth in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->jupyter-console->jupyter) (0.2.5)
Requirement already satisfied: pywinpty>=1.1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from terminado>=0.8.3->notebook->jupyter) (2.0.9)
Requirement already satisfied: argon2-cffi-bindings in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from argon2-cffi->notebook->jupyter) (21.2.0)
Requirement already satisfied: soupsieve>1.2 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from beautifulsoup4->nbconvert->jupyter) (2.3.2.post1)
Requirement already satisfied: six>=1.9.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from bleach->nbconvert->jupyter) (1.16.0)
Requirement already satisfied: webencodings in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from bleach->nbconvert->jupyter) (0.5.1)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel->jupyter) (0.8.3)
Requirement already satisfied: attrs>=17.4.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (22.2.0)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (0.19.2)
Requirement already satisfied: jupyter-server-terminals in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (0.4.3)
Requirement already satisfied: anyio<4,>=3.1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (3.6.2)
Requirement already satisfied: websocket-client in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (1.4.2)
Requirement already satisfied: jupyter-events>=0.4.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (0.5.0)
Requirement already satisfied: cffi>=1.0.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from argon2-cffi-bindings->argon2-cffi->notebook->jupyter) (1.15.1)
Requirement already satisfied: asttokens>=2.1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyter) (2.2.1)
Requirement already satisfied: pure-eval in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyter) (0.2.2)
Requirement already satisfied: executing>=1.2.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyter) (1.2.0)
Requirement already satisfied: idna>=2.8 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from anyio<4,>=3.1.0->jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (3.4)
Requirement already satisfied: sniffio>=1.1 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from anyio<4,>=3.1.0->jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (1.3.0)
Requirement already satisfied: pycparser in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook->jupyter) (2.21)
Requirement already satisfied: pyyaml in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-events>=0.4.0->jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (6.0)
Requirement already satisfied: python-json-logger in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jupyter-events>=0.4.0->jupyter-server>=1.8->nbclassic>=0.4.7->notebook->jupyter) (2.0.4)
Requirement already satisfied: isoduration in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (20.11.0)
Requirement already satisfied: rfc3339-validator in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (0.1.4)
Requirement already satisfied: rfc3986-validator>0.1.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (0.1.1)
Requirement already satisfied: fqdn in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (1.5.1)
Requirement already satisfied: webcolors>=1.11 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (1.12)
Requirement already satisfied: uri-template in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (1.2.0)
Requirement already satisfied: jsonpointer>1.13 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (2.3)
Requirement already satisfied: arrow>=0.15.0 in c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from isoduration->jsonschema>=2.6->nbformat>=5.1->nbconvert->jupyter) (1.2.3)
But when I run Jupyter Notebook I get:
'jupyter' is not recognized as an internal or external command,
operable program or batch file.
I have tried adding
c:\users\david\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
to both PATH environment variables but no luck

Errors even when i installed the app. ModuleNotFoundError: No module named 'app'

When running the code below, i get the error below saying there is no app module. I pip installed the app module already and also pip.utilities and it acknowledged it has been installed.
ModuleNotFoundError Traceback (most recent call last)
/tmp/ipykernel_28000/1292993017.py in
7 import aiofiles
8 import json
----> 9 from app.utilities.home_util import checkAPIKey
10 from app.utilities.image_util import ImageModel, get_image_model, getExtension, find_similar_image, get_similar_image_sku
11 from app.middleware.redis_wroker import RedisCacheClient, get_redis_obj
ModuleNotFoundError: No module named 'app'
import shutil
from typing import Any, List
from fastapi import APIRouter, Depends, HTTPException, UploadFile, File
from sqlalchemy.orm import Session
import os
import aiofiles
import json
from app.utilities.home_util import checkAPIKey
from app.utilities.image_util import ImageModel, get_image_model, getExtension, find_similar_image, get_similar_image_sku
from app.middleware.redis_wroker import RedisCacheClient, get_redis_obj
from app.utilities.utils import write_to_redis_cache
router = APIRouter()
#router.post('/imageSearch')
async def image_search(apikey,
image: UploadFile = File(...),
model : ImageModel = Depends(get_image_model)):
'''
Finds the similar looking images from the request image
Usage: curl -X POST DelvifyAPI/APIKEY/imageSearch -F 'file=#/path/to/imagefile.ext' -i
:param apikey: Unique API_KEY
:return: list of sku
'''
clientDirPath = checkAPIKey(apikey)
if os.path.exists(clientDirPath):
ext = getExtension(image.filename)
if ext in ['jpg', 'jpeg', 'jepg', 'png']:
async with aiofiles.open(os.path.join(clientDirPath, 'useruploads/' + image.filename), "wb") as outfile:
content = await image.read()
await outfile.write(content)
outfile.close()
result = model.find_similar_image(image.filename, clientDirPath)
return result #jsonify({"skus": result})
else:
return "Please upload the image file type! eg: jpg, jpeg, png"
#router.get("/imageSearchBySKU")
async def image_search_by_sku(apikey, sku:str,
redis_client : RedisCacheClient = Depends(get_redis_obj)):
'''
Takes in an apikey as an unique client key, and pass in the sku as argument
Usage: curl DelvifyAPI/APIKEY/imageSearchBySKU?sku='sku_val'
:param apikey, sku : unique apikey to clientm and sku
:return: list of similar looking items
'''
clientDirPath = checkAPIKey(apikey)
if os.path.exists(clientDirPath):
redis_key = f'{apikey}_image_sku_{sku}'
redis_result = redis_client.get_redis().get(redis_key)
if redis_result is None:
result = get_similar_image_sku(clientDirPath, sku)
write_to_redis_cache(redis_client, redis_key, result)
return result
else:
return json.loads(redis_result)
else:
return "Please Train your data!"
code showing that the app is installed:
pip install app
Requirement already satisfied: app in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (0.1.0)
Requirement already satisfied: jinja2<3.0.0,>=2.11.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (2.11.2)
Requirement already satisfied: python-jose[cryptography]<4.0.0,>=3.1.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (3.2.0)
Requirement already satisfied: pydantic<2.0,>=1.4 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (1.6.1)
Requirement already satisfied: alembic<2.0.0,>=1.4.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (1.4.3)
Requirement already satisfied: raven<7.0.0,>=6.10.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (6.10.0)
Requirement already satisfied: requests<3.0.0,>=2.23.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (2.24.0)
Requirement already satisfied: celery<5.0.0,>=4.4.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (4.4.7)
Requirement already satisfied: emails<0.6.0,>=0.5.15 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (0.5.15)
Requirement already satisfied: passlib[bcrypt]<2.0.0,>=1.7.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (1.7.4)
Requirement already satisfied: uvicorn<0.12.0,>=0.11.3 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (0.11.8)
Requirement already satisfied: pytest<6.0.0,>=5.4.1 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (5.4.3)
Requirement already satisfied: tenacity<7.0.0,>=6.1.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (6.2.0)
Requirement already satisfied: gunicorn<21.0.0,>=20.0.4 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (20.0.4)
Requirement already satisfied: fastapi<0.55.0,>=0.54.1 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (0.54.2)
Requirement already satisfied: email-validator<2.0.0,>=1.0.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (1.1.1)
Requirement already satisfied: python-multipart<0.0.6,>=0.0.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (0.0.5)
Requirement already satisfied: psycopg2-binary<3.0.0,>=2.8.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (2.8.6)
Requirement already satisfied: sqlalchemy<2.0.0,>=1.3.16 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app) (1.3.20)
Requirement already satisfied: MarkupSafe>=0.23 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from jinja2<3.0.0,>=2.11.2->app) (1.1.1)
Requirement already satisfied: ecdsa<0.15 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from python-jose[cryptography]<4.0.0,>=3.1.0->app) (0.14.1)
Requirement already satisfied: six<2.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from python-jose[cryptography]<4.0.0,>=3.1.0->app) (1.15.0)
Requirement already satisfied: rsa in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from python-jose[cryptography]<4.0.0,>=3.1.0->app) (4.6)
Requirement already satisfied: pyasn1 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from python-jose[cryptography]<4.0.0,>=3.1.0->app) (0.4.8)
Requirement already satisfied: cryptography; extra == "cryptography" in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from python-jose[cryptography]<4.0.0,>=3.1.0->app) (3.1.1)
Requirement already satisfied: Mako in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from alembic<2.0.0,>=1.4.2->app) (1.1.3)
Requirement already satisfied: python-dateutil in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from alembic<2.0.0,>=1.4.2->app) (2.8.1)
Requirement already satisfied: python-editor>=0.3 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from alembic<2.0.0,>=1.4.2->app) (1.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.23.0->app) (2022.5.18.1)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.23.0->app) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.23.0->app) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.23.0->app) (1.25.11)
Requirement already satisfied: kombu<4.7,>=4.6.10 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from celery<5.0.0,>=4.4.2->app) (4.6.11)
Requirement already satisfied: vine==1.3.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from celery<5.0.0,>=4.4.2->app) (1.3.0)
Requirement already satisfied: pytz>dev in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from celery<5.0.0,>=4.4.2->app) (2020.1)
Requirement already satisfied: billiard<4.0,>=3.6.3.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from celery<5.0.0,>=4.4.2->app) (3.6.3.0)
Requirement already satisfied: premailer in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from emails<0.6.0,>=0.5.15->app) (3.7.0)
Requirement already satisfied: cssutils in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from emails<0.6.0,>=0.5.15->app) (1.0.2)
Requirement already satisfied: lxml in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from emails<0.6.0,>=0.5.15->app) (4.6.1)
Requirement already satisfied: bcrypt>=3.1.0; extra == "bcrypt" in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from passlib[bcrypt]<2.0.0,>=1.7.2->app) (3.2.0)
Requirement already satisfied: h11<0.10,>=0.8 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from uvicorn<0.12.0,>=0.11.3->app) (0.9.0)
Requirement already satisfied: websockets==8.* in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from uvicorn<0.12.0,>=0.11.3->app) (8.1)
Requirement already satisfied: click==7.* in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from uvicorn<0.12.0,>=0.11.3->app) (7.1.2)
Requirement already satisfied: uvloop>=0.14.0; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy" in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from uvicorn<0.12.0,>=0.11.3->app) (0.14.0)
Requirement already satisfied: httptools==0.1.*; sys_platform != "win32" and sys_platform != "cygwin" and platform_python_implementation != "PyPy" in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from uvicorn<0.12.0,>=0.11.3->app) (0.1.1)
Requirement already satisfied: more-itertools>=4.0.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (8.5.0)
Requirement already satisfied: wcwidth in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (0.2.5)
Requirement already satisfied: packaging in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (20.4)
Requirement already satisfied: attrs>=17.4.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (20.2.0)
Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (2.0.0)
Requirement already satisfied: pluggy<1.0,>=0.12 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (0.13.1)
Requirement already satisfied: py>=1.5.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from pytest<6.0.0,>=5.4.1->app) (1.9.0)
Requirement already satisfied: setuptools>=3.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from gunicorn<21.0.0,>=20.0.4->app) (50.3.0.post20201006)
Requirement already satisfied: starlette==0.13.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from fastapi<0.55.0,>=0.54.1->app) (0.13.2)
Requirement already satisfied: dnspython>=1.15.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from email-validator<2.0.0,>=1.0.5->app) (2.0.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from cryptography; extra == "cryptography"->python-jose[cryptography]<4.0.0,>=3.1.0->app) (1.14.3)
Requirement already satisfied: amqp<2.7,>=2.6.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from kombu<4.7,>=4.6.10->celery<5.0.0,>=4.4.2->app) (2.6.1)
Requirement already satisfied: cachetools in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from premailer->emails<0.6.0,>=0.5.15->app) (4.1.1)
Requirement already satisfied: cssselect in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from premailer->emails<0.6.0,>=0.5.15->app) (1.1.0)
Requirement already satisfied: pyparsing>=2.0.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from packaging->pytest<6.0.0,>=5.4.1->app) (2.4.7)
Requirement already satisfied: zipp>=0.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->pytest<6.0.0,>=5.4.1->app) (3.3.1)
Requirement already satisfied: pycparser in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography; extra == "cryptography"->python-jose[cryptography]<4.0.0,>=3.1.0->app) (2.20)
Note: you may need to restart the kernel to use updated packages
pip install app.utilities
Requirement already satisfied: app.utilities in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (0.1.9)
Requirement already satisfied: requests>=2.0.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app.utilities) (2.24.0)
Requirement already satisfied: pymongo>=3.0.0 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from app.utilities) (4.1.1)
Requirement already satisfied: certifi>=2017.4.17 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests>=2.0.0->app.utilities) (2022.5.18.1)
Requirement already satisfied: chardet<4,>=3.0.2 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests>=2.0.0->app.utilities) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests>=2.0.0->app.utilities) (1.25.11)
Requirement already satisfied: idna<3,>=2.5 in /home/ubuntu/anaconda3/envs/myenv/lib/python3.7/site-packages (from requests>=2.0.0->app.utilities) (2.10)
Note: you may need to restart the kernel to use updated packages.

Pip error while installing tensorflow: no disk space

I have been trying to install tensorflow on my system for python3.8 with pip3 v 20.1.1 ; Linux ( Ubuntu 20.04 LTS ). after the download is complete it returns error that there is not enough space:
Using cached tensorflow-2.2.0-cp38-cp38-manylinux2010_x86_64.whl (516.3 MB)
Requirement already satisfied: google-pasta>=0.1.8 in ./.local/lib/python3.8/site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: protobuf>=3.8.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (3.12.2)
Requirement already satisfied: tensorboard<2.3.0,>=2.2.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (2.2.2)
Requirement already satisfied: opt-einsum>=2.3.2 in ./.local/lib/python3.8/site-packages (from tensorflow) (3.2.1)
Requirement already satisfied: numpy<2.0,>=1.16.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (1.18.4)
Requirement already satisfied: wrapt>=1.11.1 in ./.local/lib/python3.8/site-packages (from tensorflow) (1.12.1)
Requirement already satisfied: tensorflow-estimator<2.3.0,>=2.2.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (2.2.0)
Requirement already satisfied: absl-py>=0.7.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (0.9.0)
Requirement already satisfied: six>=1.12.0 in /usr/lib/python3/dist-packages (from tensorflow) (1.14.0)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (2.10.0)
Requirement already satisfied: gast==0.3.3 in ./.local/lib/python3.8/site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: astunparse==1.6.3 in ./.local/lib/python3.8/site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: keras-preprocessing>=1.1.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (1.1.2)
Requirement already satisfied: termcolor>=1.1.0 in ./.local/lib/python3.8/site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: wheel>=0.26; python_version >= "3" in /usr/lib/python3/dist-packages (from tensorflow) (0.34.2)
Requirement already satisfied: grpcio>=1.8.6 in ./.local/lib/python3.8/site-packages (from tensorflow) (1.29.0)
Requirement already satisfied: scipy==1.4.1; python_version >= "3" in ./.local/lib/python3.8/site-packages (from tensorflow) (1.4.1)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.8.0->tensorflow) (45.2.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in ./.local/lib/python3.8/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (1.16.1)
Requirement already satisfied: werkzeug>=0.11.15 in ./.local/lib/python3.8/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (1.0.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in ./.local/lib/python3.8/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (0.4.1)
Requirement already satisfied: requests<3,>=2.21.0 in /usr/lib/python3/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (2.22.0)
Requirement already satisfied: markdown>=2.6.8 in /usr/lib/python3/dist-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (3.1.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in ./.local/lib/python3.8/site-packages (from tensorboard<2.3.0,>=2.2.0->tensorflow) (1.6.0.post3)
Requirement already satisfied: rsa<4.1,>=3.1.4 in ./.local/lib/python3.8/site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (4.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./.local/lib/python3.8/site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in ./.local/lib/python3.8/site-packages (from google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (4.1.0)
Requirement already satisfied: requests-oauthlib>=0.7.0 in ./.local/lib/python3.8/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow) (1.3.0)
Requirement already satisfied: pyasn1>=0.1.3 in ./.local/lib/python3.8/site-packages (from rsa<4.1,>=3.1.4->google-auth<2,>=1.6.3->tensorboard<2.3.0,>=2.2.0->tensorflow) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in /usr/lib/python3/dist-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<2.3.0,>=2.2.0->tensorflow) (3.1.0)
Installing collected packages: tensorflow
ERROR: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device
I have 2GiB+ free space on all partitions except /srv, /boot and /boot/efi
What do I do?

tensorflow installation on gpu in ubuntu

pip3 install tensorflow-gpu --user
whenever I run the above command I usually get this message;
Requirement already satisfied: tensorflow-gpu in ./.local/lib/python3.5/site-packages (1.9.0)
Requirement already satisfied: setuptools<=39.1.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (39.1.0)
Requirement already satisfied: protobuf>=3.4.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (3.6.0)
Requirement already satisfied: absl-py>=0.1.6 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (0.3.0)
Requirement already satisfied: wheel>=0.26 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (0.31.1)
Requirement already satisfied: numpy>=1.13.3 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (1.15.0)
Requirement already satisfied: termcolor>=1.1.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (1.1.0)
Requirement already satisfied: six>=1.10.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (1.11.0)
Requirement already satisfied: gast>=0.2.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (0.2.0)
Requirement already satisfied: tensorboard<1.10.0,>=1.9.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (1.9.0)
Requirement already satisfied: grpcio>=1.8.6 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (1.13.0)
Requirement already satisfied: astor>=0.6.0 in ./.local/lib/python3.5/site-packages (from tensorflow-gpu) (0.7.1)
Requirement already satisfied: werkzeug>=0.11.10 in ./.local/lib/python3.5/site-packages (from tensorboard<1.10.0,>=1.9.0->tensorflow-gpu) (0.14.1)
Requirement already satisfied: markdown>=2.6.8 in ./.local/lib/python3.5/site-packages (from tensorboard<1.10.0,>=1.9.0->tensorflow-gpu) (2.6.11)
and when I goto python3 and import tensorflow as tf;
I get the following errors:
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
I had the exact problem. I uninstalled tensorflow and followed the steps mentioned in the link below and it worked:
http://www.python36.com/how-to-install-tensorflow-gpu-with-cuda-9-2-for-python-on-ubuntu/

Categories

Resources