Using terminal on Jupyter Lab not working - python

I am working on Jupyter Lab, and I opened the terminal. I tried to install the module spacy, but when I came to the part where it said $ python ..., it said /bin/bash: python: command not found.
My code:
$ pip install -U pip setuptools wheel
$ pip install -U spacy
$ python -m spacy download en_core_web_sm
The output:
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (23.0)
Requirement already satisfied: setuptools in /home/repl/.local/lib/python3.8/site-packages (67.2.0)
Requirement already satisfied: wheel in /usr/local/lib/python3.8/dist-packages (0.38.4)
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: spacy in /home/repl/.local/lib/python3.8/site-packages (3.5.0)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from spacy) (3.0.8)
Requirement already satisfied: typer<0.8.0,>=0.3.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (0.7.0)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4 in /usr/local/lib/python3.8/dist-packages (from spacy) (1.10.2)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (2.28.1)
Requirement already satisfied: wasabi<1.2.0,>=0.9.1 in /usr/local/lib/python3.8/dist-packages (from spacy) (0.10.1)
Requirement already satisfied: numpy>=1.15.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (1.23.2)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (21.3)
Requirement already satisfied: langcodes<4.0.0,>=3.2.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (3.3.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.8/dist-packages (from spacy) (3.1.2)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from spacy) (2.0.7)
Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.11 in /home/repl/.local/lib/python3.8/site-packages (from spacy) (3.0.12)
Requirement already satisfied: srsly<3.0.0,>=2.4.3 in /usr/local/lib/python3.8/dist-packages (from spacy) (2.4.5)
Requirement already satisfied: pathy>=0.10.0 in /home/repl/.local/lib/python3.8/site-packages (from spacy) (0.10.1)
Requirement already satisfied: smart-open<7.0.0,>=5.2.1 in /usr/local/lib/python3.8/dist-packages (from spacy) (5.2.1)
Requirement already satisfied: catalogue<2.1.0,>=2.0.6 in /usr/local/lib/python3.8/dist-packages (from spacy) (2.0.8)
Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (4.64.0)
Requirement already satisfied: thinc<8.2.0,>=8.1.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (8.1.5)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (1.0.9)
Requirement already satisfied: setuptools in /home/repl/.local/lib/python3.8/site-packages (from spacy) (67.2.0)
Requirement already satisfied: spacy-loggers<2.0.0,>=1.0.0 in /usr/local/lib/python3.8/dist-packages (from spacy) (1.0.3)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging>=20.0->spacy) (3.0.9)
Requirement already satisfied: typing-extensions>=4.1.0 in /usr/local/lib/python3.8/dist-packages (from pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4->spacy) (4.3.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (2.8)
Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (2.0.12)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (2019.11.28)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (1.25.8)
Requirement already satisfied: confection<1.0.0,>=0.0.1 in /usr/local/lib/python3.8/dist-packages (from thinc<8.2.0,>=8.1.0->spacy) (0.0.3)
Requirement already satisfied: blis<0.8.0,>=0.7.8 in /usr/local/lib/python3.8/dist-packages (from thinc<8.2.0,>=8.1.0->spacy) (0.7.9)
Requirement already satisfied: click<9.0.0,>=7.1.1 in /usr/local/lib/python3.8/dist-packages (from typer<0.8.0,>=0.3.0->spacy) (8.1.3)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.8/dist-packages (from jinja2->spacy) (2.1.1)
/bin/bash: python: command not found
And the whole point of this was to load the spacy 'en_core_web_sm' tool.
If this is unfixable, then what other ways are there to load the en_core_web_sm model?

Related

when using train tab in stable diffusion webui, it says can't find Deepdanbooru

When i was running stable-diffusion-webui's preprocess images feature on MacBookpro M1 + macos12.6 + python3.10, it says:
File "user/Desktop/stable-diffusion-webui/modules/deepbooru.py", line 88, in get_deepbooru_tags_model
import deepdanbooru as dd
ModuleNotFoundError: No module named 'deepdanbooru'
somebody have any ideas how to slove this problem?
i also tried
git and reinstall through pip:
tensorflow-macos
tensorflow-io
deepdanbooru
but they all doesn't works
and im already install:
tensorflow-macos 2.1.0, tensorflow-io 0.27.0
when i run pip install deepdanbooru
result is:
Requirement already satisfied: deepdanbooru in /opt/homebrew/lib/python3.10/site-packages/deepdanbooru-1.0.0-py3.10.egg (1.0.0)
Requirement already satisfied: Click>=7.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (8.1.3)
Requirement already satisfied: numpy>=1.16.2 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (1.23.5)
Requirement already satisfied: scikit-image>=0.15.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (0.19.3)
Requirement already satisfied: requests>=2.22.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (2.28.1)
Requirement already satisfied: six>=1.13.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (1.16.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (2022.9.24)
Requirement already satisfied: charset-normalizer<3,>=2 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (1.26.12)
Requirement already satisfied: tifffile>=2019.7.26 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (2022.10.10)
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,!=8.3.0,>=6.1.0 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (9.3.0)
Requirement already satisfied: scipy>=1.4.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (1.9.3)
Requirement already satisfied: packaging>=20.0 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (21.3)
Requirement already satisfied: imageio>=2.4.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (2.22.4)
Requirement already satisfied: networkx>=2.2 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (2.8.8)
Requirement already satisfied: PyWavelets>=1.1.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (1.4.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/homebrew/lib/python3.10/site-packages (from packaging>=20.0->scikit-image>=0.15.0->deepdanbooru) (3.0.9)```

I cannot importing KERAS tuner using anaconda

I am trying to import Keras tuner using anaconda and I think it has some issue with its installation because when I am executing the code it keeps telling me that there is no such a model with this name, and I tried with many other names but not worked, then I noticed that there is some kind of warnings in the installation but not understand it as shown below
when I did each one of these commands
pip install keras-tuner
pip install kerastuner
pip install keras_tuner
the response was:
WARNING: Ignoring invalid distribution -ip (d:\aapython3.9\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\aapython3.9\lib\site-packages)
Requirement already satisfied: keras-tuner in d:\aapython3.9\lib\site-packages (1.0.4)
Requirement already satisfied: numpy in d:\aapython3.9\lib\site-packages (from keras-tuner) (1.19.5)
Requirement already satisfied: requests in d:\aapython3.9\lib\site-packages (from keras-tuner) (2.26.0)
Requirement already satisfied: tensorboard in d:\aapython3.9\lib\site-packages (from keras-tuner) (2.6.0)
Requirement already satisfied: kt-legacy in d:\aapython3.9\lib\site-packages (from keras-tuner) (1.0.4)
Requirement already satisfied: ipython in d:\aapython3.9\lib\site-packages (from keras-tuner) (7.22.0)
Requirement already satisfied: scipy in d:\aapython3.9\lib\site-packages (from keras-tuner) (1.6.2)
Requirement already satisfied: packaging in d:\aapython3.9\lib\site-packages (from keras-tuner) (21.0)
Requirement already satisfied: jedi>=0.16 in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (0.18.0)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (3.0.18)
Requirement already satisfied: pickleshare in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (0.7.5)
Requirement already satisfied: setuptools>=18.5 in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (49.2.1)
Requirement already satisfied: pygments in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (2.8.1)
Requirement already satisfied: decorator in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (5.0.7)
Requirement already satisfied: colorama in c:\users\user\appdata\roaming\python\python39\site-packages (from ipython->keras-tuner) (0.4.4)
Requirement already satisfied: traitlets>=4.2 in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (5.0.5)
Requirement already satisfied: backcall in d:\aapython3.9\lib\site-packages (from ipython->keras-tuner) (0.2.0)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in d:\aapython3.9\lib\site-packages (from jedi>=0.16->ipython->keras-tuner) (0.8.2)
Requirement already satisfied: wcwidth in d:\aapython3.9\lib\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython->keras-tuner) (0.2.5)
Requirement already satisfied: ipython-genutils in d:\aapython3.9\lib\site-packages (from traitlets>=4.2->ipython->keras-tuner) (0.2.0)
Requirement already satisfied: pyparsing>=2.0.2 in d:\aapython3.9\lib\site-packages (from packaging->keras-tuner) (2.4.7)
Requirement already satisfied: certifi>=2017.4.17 in d:\aapython3.9\lib\site-packages (from requests->keras-tuner) (2021.5.30)
Requirement already satisfied: charset-normalizer~=2.0.0 in d:\aapython3.9\lib\site-packages (from requests->keras-tuner) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in d:\aapython3.9\lib\site-packages (from requests->keras-tuner) (3.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:\aapython3.9\lib\site-packages (from requests->keras-tuner) (1.26.6)
Requirement already satisfied: wheel>=0.26 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (0.37.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (1.35.0)
Requirement already satisfied: absl-py>=0.4 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (0.13.0)
Requirement already satisfied: werkzeug>=0.11.15 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (2.0.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (1.8.0)
Requirement already satisfied: grpcio>=1.24.3 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (1.39.0)
Requirement already satisfied: markdown>=2.6.8 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (3.3.4)
Requirement already satisfied: protobuf>=3.6.0 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (3.15.6)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (0.4.5)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in d:\aapython3.9\lib\site-packages (from tensorboard->keras-tuner) (0.6.1)
Requirement already satisfied: six in c:\users\user\appdata\roaming\python\python39\site-packages (from absl-py>=0.4->tensorboard->keras-tuner) (1.15.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in d:\aapython3.9\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard->keras-tuner) (4.2.2)
Requirement already satisfied: rsa<5,>=3.1.4 in d:\aapython3.9\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard->keras-tuner) (4.7.2)
Requirement already satisfied: pyasn1-modules>=0.2.1 in d:\aapython3.9\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard->keras-tuner) (0.2.8)
Requirement already satisfied: requests-oauthlib>=0.7.0 in d:\aapython3.9\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard->keras-tuner) (1.3.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in d:\aapython3.9\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard->keras-tuner) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in d:\aapython3.9\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->keras-tuner) (3.1.1)
WARNING: Ignoring invalid distribution -ip (d:\aapython3.9\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\aapython3.9\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (d:\aapython3.9\lib\site-packages)
then when I am executing my code I got this:
Traceback (most recent call last):
File "ExpMnistTunerE1.py", line 23, in
from kerastuner.tuners import RandomSearch
ModuleNotFoundError: No module named 'kerastuner'
enter image description here

fbprophet Error : AttributeError: 'StanModel' object has no attribute 'fit_class'AttributeError: 'StanModel' object has no attribute 'fit_class'

I am trying to use fbprophet have installed all required packages. Please refer to below package details.
Requirement already satisfied: fbprophet in c:\programdata\anaconda3\lib\site-packages (0.7.1)
Requirement already satisfied: Cython>=0.22 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (0.29.21)
Requirement already satisfied: cmdstanpy==0.9.5 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (0.9.5)
Requirement already satisfied: pystan>=2.14 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (2.19.1.1)
Requirement already satisfied: numpy>=1.15.4 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (1.19.2)
Requirement already satisfied: pandas>=1.0.4 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (1.1.3)
Requirement already satisfied: matplotlib>=2.0.0 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (3.3.2)
Requirement already satisfied: LunarCalendar>=0.0.9 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (0.0.9)
Requirement already satisfied: convertdate>=2.1.2 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (2.2.0)
Requirement already satisfied: holidays>=0.10.2 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (0.10.4)
Requirement already satisfied: setuptools-git>=1.2 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (2.8.1)
Requirement already satisfied: tqdm>=4.36.1 in c:\programdata\anaconda3\lib\site-packages (from fbprophet) (4.50.2)
Requirement already satisfied: pytz>=2017.2 in c:\programdata\anaconda3\lib\site-packages (from pandas>=1.0.4->fbprophet) (2019.3)
Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (8.0.1)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (2.4.7)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (1.3.0)
Requirement already satisfied: certifi>=2020.06.20 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=2.0.0->fbprophet) (2020.6.20)
Requirement already satisfied: ephem>=3.7.5.3 in c:\programdata\anaconda3\lib\site-packages (from LunarCalendar>=0.0.9->fbprophet) (3.7.7.1)
Requirement already satisfied: pymeeus<=1,>=0.3.6 in c:\programdata\anaconda3\lib\site-packages (from convertdate>=2.1.2->fbprophet) (0.3.7)
Requirement already satisfied: korean-lunar-calendar in c:\programdata\anaconda3\lib\site-packages (from holidays>=0.10.2->fbprophet) (0.2.1)
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from holidays>=0.10.2->fbprophet) (1.15.0)
But while fitting model I am getting error "AttributeError: 'StanModel' object has no attribute 'fit_class'"
Can anyone please help me how to resolve this error
Also getting below warning when tried to load model
model = Prophet()
WARNING:pystan:No module named 'stanfit4anon_model_f5236004a3fd5b8429270d00efcc0cf9_4174861822198299618'
WARNING:pystan:Something went wrong while unpickling the StanModel. Consider recompiling.
Use prophet instead of fbprophet .
pip install pystan==2.19.1.1
pip install prophet

Cannot install tensorflow with error EnvironmentError: [Errno 2] No such file or directory

I am new to python so I am not using any environment, all I am doing is trying to install tensorflow using pip and getting the following:
> pip install tensorflow
Collecting tensorflow
Using cached tensorflow-2.3.1-cp38-cp38-win_amd64.whl (342.5 MB)
Requirement already satisfied: google-pasta>=0.1.8 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: tensorboard<3,>=2.3.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: grpcio>=1.8.6 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.33.2)
Requirement already satisfied: numpy<1.19.0,>=1.16.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.18.5)
Requirement already satisfied: astunparse==1.6.3 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: wrapt>=1.11.1 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.12.1)
Requirement already satisfied: wheel>=0.26 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (0.35.1)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (2.10.0)
Requirement already satisfied: six>=1.12.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.15.0)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: gast==0.3.3 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (0.11.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (1.1.2)
Requirement already satisfied: protobuf>=3.9.2 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorflow) (3.13.0)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.7.0)
Requirement already satisfied: markdown>=2.6.8 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (3.3.3)
Requirement already satisfied: setuptools>=41.0.0 in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (49.2.1)
Requirement already satisfied: werkzeug>=0.11.15 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.0.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.4.2)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.23.0)
Requirement already satisfied: requests<3,>=2.21.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.24.0)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (1.3.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.6)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.1.1)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2020.11.8)
Requirement already satisfied: oauthlib>=3.0.0 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (3.1.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in c:\users\teren\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.4.8)
Installing collected packages: tensorflow
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\teren\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\tensorflow\\include\\external\\com_github_grpc_grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.h'
The pip version is 20.2.4 and the python version is 3.8.
I am using Windows 10 so I am not sure if this is a windows thing.
I see that the pip is using a cached package so I tried
pip --no-cache-dir install tensorflow
but I still get
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\teren\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\tensorflow\\include\\external\\com_github_grpc_grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.h'
The problem with missing files during pip install on Windows happens when the path is too long.
You can fix this by using regedit, going to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and changing the value of LongPathsEnabled to 1.
You need to create an environment which is recommended by tensorflow community
Please follow the following link
https://www.tensorflow.org/install/pip
Please ensure you follow this document step by step
Incase if you feel that its a lot of manual work then use Anaconda navigator
Click on Environments tab create Environment named tensorflow and then on to right download all packages which you need to install
Once done click on your new environment and launch jupyter notebook

twine showing "No such file or directory" error

I'm running a Ubuntu 18.04 system, recently installed a new ssd and mapped $HOME onto the ssd then moved the existing files onto it. Somehow, in that process I've mucked up my PYTHONPATH, I believe.
If I run twine upload dist/* I get the following error:
bash: /home/henry/.local/bin/twine: No such file or directory
If I run pip install twine, I get the following output:
Requirement already satisfied: twine in /usr/local/lib/python2.7/dist-packages (1.12.1)
Requirement already satisfied: setuptools>=0.7.0 in /home/henry/.local/lib/python2.7/site-packages (from twine) (39.1.0)
Requirement already satisfied: pkginfo>=1.4.2 in /home/henry/.local/lib/python2.7/site-packages (from twine) (1.4.2)
Requirement already satisfied: readme-renderer>=21.0 in /usr/local/lib/python2.7/dist-packages (from twine) (24.0)
Requirement already satisfied: requests!=2.15,!=2.16,>=2.5.0 in /home/henry/.local/lib/python2.7/site-packages (from twine) (2.18.4)
Requirement already satisfied: tqdm>=4.14 in /home/henry/.local/lib/python2.7/site-packages (from twine) (4.23.3)
Requirement already satisfied: requests-toolbelt>=0.8.0 in /home/henry/.local/lib/python2.7/site-packages (from twine) (0.8.0)
Requirement already satisfied: Pygments in /home/henry/.local/lib/python2.7/site-packages (from readme-renderer>=21.0->twine) (2.2.0)
Requirement already satisfied: six in /home/henry/.local/lib/python2.7/site-packages (from readme-renderer>=21.0->twine) (1.11.0)
Requirement already satisfied: bleach>=2.1.0 in /usr/local/lib/python2.7/dist-packages (from readme-renderer>=21.0->twine) (3.0.2)
Requirement already satisfied: docutils>=0.13.1 in /home/henry/.local/lib/python2.7/site-packages (from readme-renderer>=21.0->twine) (0.14)
Requirement already satisfied: idna<2.7,>=2.5 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (2018.1.18)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (3.0.4)
Requirement already satisfied: webencodings in /usr/lib/python2.7/dist-packages (from bleach>=2.1.0->readme-renderer>=21.0->twine) (0.5)
echo "PYTHONPATH=$PYTHONPATH" gives me PYTHONPATH=
What do I do to correct?
use
python -m twine upload dist/*

Categories