Python isn't running openai script after installing it with pip - python

I'm having an issue with my terminal while trying to run the openai scripts.
I install it using pip install openai and then when I try to run it typing openai I have the error: openai : The term 'openai' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of At line:1 char:1.
But the installation is always successfull:
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
Collecting openai
Using cached openai-0.11.0.tar.gz (150 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: requests>=2.20 in c:\users\igor\appdata\roaming\python\python39\site-packages (from openai) (2.26.0)
Requirement already satisfied: tqdm in c:\users\igor\appdata\roaming\python\python39\site-packages (from openai) (4.62.3)
Requirement already satisfied: pandas>=1.2.3 in c:\python39\lib\site-packages (from openai) (1.3.4)
Requirement already satisfied: pandas-stubs>=1.1.0.11 in c:\users\igor\appdata\roaming\python\python39\site-packages (from openai) (1.2.0.38)
Requirement already satisfied: openpyxl>=3.0.7 in c:\users\igor\appdata\roaming\python\python39\site-packages (from openai) (3.0.9)
Requirement already satisfied: et-xmlfile in c:\python39\lib\site-packages (from openpyxl>=3.0.7->openai) (1.1.0)
Requirement already satisfied: python-dateutil>=2.7.3 in c:\python39\lib\site-packages (from pandas>=1.2.3->openai) (2.8.2)
Requirement already satisfied: pytz>=2017.3 in c:\python39\lib\site-packages (from pandas>=1.2.3->openai) (2021.3)
Requirement already satisfied: numpy>=1.17.3 in c:\python39\lib\site-packages (from pandas>=1.2.3->openai) (1.21.4)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\python39\lib\site-packages (from requests>=2.20->openai) (2.0.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\python39\lib\site-packages (from requests>=2.20->openai) (1.26.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\igor\appdata\roaming\python\python39\site-packages (from requests>=2.20->openai) (2021.10.8)
Requirement already satisfied: idna<4,>=2.5 in c:\python39\lib\site-packages (from requests>=2.20->openai) (3.3)
Requirement already satisfied: colorama in c:\users\igor\appdata\roaming\python\python39\site-packages (from tqdm->openai) (0.4.4)
Requirement already satisfied: six>=1.5 in c:\python39\lib\site-packages (from python-dateutil>=2.7.3->pandas>=1.2.3->openai) (1.16.0)
Using legacy 'setup.py install' for openai, since package 'wheel' is not installed.
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
Installing collected packages: openai
Running setup.py install for openai ... done
Successfully installed openai-0.11.0
WARNING: Ignoring invalid distribution -ip (c:\python39\lib\site-packages)
I had this issue on powershell and on git bash either.

make sure to use Linux, as everything of OpenAI is based on linux.
I hope it helps
-- random stranger ;)

Related

while installing mu editor, i get error metadata-generation-failed and error subprocess-exited-with-error. I've updated pip, am running python 3.10.4

Defaulting to user installation because normal site-packages is not
writeable Requirement already satisfied: mu-editor in
./.local/lib/python3.10/site-packages (1.0.3) Requirement already
satisfied: pycodestyle==2.4.0 in ./.local/lib/python3.10/site-packages
(from mu-editor) (2.4.0) Requirement already satisfied:
qtconsole==4.3.1 in ./.local/lib/python3.10/site-packages (from
mu-editor) (4.3.1) Requirement already satisfied: PyQtChart==5.14.0 in
./.local/lib/python3.10/site-packages (from mu-editor) (5.14.0)
Requirement already satisfied: gpiozero>=1.4.1 in
./.local/lib/python3.10/site-packages (from mu-editor) (1.6.2)
Requirement already satisfied: Pillow>=5.2.0 in
/usr/lib/python3/dist-packages (from mu-editor) (9.0.1) Requirement
already satisfied: requests>=2.19.1 in /usr/lib/python3/dist-packages
(from mu-editor) (2.25.1) Requirement already satisfied: semver>=2.8.0
in ./.local/lib/python3.10/site-packages (from mu-editor) (2.13.0)
Collecting pgzero==1.2 Using cached pgzero-1.2-py3-none-any.whl (69
kB) Collecting pyqt5==5.14.1 Using cached
PyQt5-5.14.1-5.14.1-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl
(63.5 MB) Requirement already satisfied: pyserial==3.4 in
./.local/lib/python3.10/site-packages (from mu-editor) (3.4)
Requirement already satisfied: qscintilla==2.11.4 in
./.local/lib/python3.10/site-packages (from mu-editor) (2.11.4)
Requirement already satisfied: pigpio>=1.40.post1 in
./.local/lib/python3.10/site-packages (from mu-editor) (1.78)
Requirement already satisfied: nudatus>=0.0.3 in
./.local/lib/python3.10/site-packages (from mu-editor) (0.0.5)
Requirement already satisfied: appdirs>=1.4.3 in
./.local/lib/python3.10/site-packages (from mu-editor) (1.4.4)
Requirement already satisfied: guizero>=1.1.0 in
./.local/lib/python3.10/site-packages (from mu-editor) (1.3.0)
Requirement already satisfied: matplotlib==2.2.2 in
./.local/lib/python3.10/site-packages (from mu-editor) (2.2.2)
Requirement already satisfied: pyflakes==2.0.0 in
./.local/lib/python3.10/site-packages (from mu-editor) (2.0.0)
Collecting kiwisolver>=1.0.1 Using cached
kiwisolver-1.4.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
(1.6 MB) Requirement already satisfied: six>=1.10 in
/usr/lib/python3/dist-packages (from matplotlib==2.2.2->mu-editor)
(1.16.0) Requirement already satisfied:
pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in
/usr/lib/python3/dist-packages (from matplotlib==2.2.2->mu-editor)
(2.4.7) Collecting python-dateutil>=2.1 Using cached
python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Collecting
cycler>=0.10 Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages
(from matplotlib==2.2.2->mu-editor) (2022.1) Requirement already
satisfied: numpy>=1.7.1 in ./.local/lib/python3.10/site-packages (from
matplotlib==2.2.2->mu-editor) (1.22.3) Collecting pygame<2.0,>=1.9.2
Using cached pygame-1.9.6.tar.gz (3.2 MB) Preparing metadata
(setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [12 lines of output]
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using UNIX configuration...
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
/bin/sh: 1: sdl-config: not found
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
Hunting dependencies...
WARNING: "sdl-config" failed!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above
for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I've installed python 3.10.4, reinstalled pip3 and updated it (tried to at least).
I've followed the instructions on mu's website.
I'm using Pop!_OS 22.04 LTS x86_64. I recently updated my pop os from 20.04 LTS. After updating, mu-editor worked for a while and now I got this problem. I'm assuming it's due to my messing up some sort of code.
Any help or suggestions r greatly appreciated!
I suggest either
try running with --use-deprecated=backtrack-on-build-failures for
example pip install pygames --use-deprecated=backtrack-on-build-failures
OR
Try this command which I got from another stackoverflow question
sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev Before running your commands

plaidml-setup is not recognized on Windows, even after successful installation

I followed all the steps as on the documentation from VertexAI but after installing plaidml-keras, when I try to run setup, it throws an error.
C:\Users\anura>pip install plaidml-keras
Requirement already satisfied: plaidml-keras in c:\python39\lib\site-packages (0.7.0)
Requirement already satisfied: six in c:\python39\lib\site-packages (from plaidml-keras) (1.15.0)
Requirement already satisfied: keras==2.2.4 in c:\python39\lib\site-packages (from plaidml-keras) (2.2.4)
Requirement already satisfied: plaidml in c:\python39\lib\site-packages (from plaidml-keras) (0.7.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\python39\lib\site-packages (from keras==2.2.4->plaidml-keras) (1.1.2)
Requirement already satisfied: scipy>=0.14 in c:\python39\lib\site-packages (from keras==2.2.4->plaidml-keras) (1.6.2)
Requirement already satisfied: numpy>=1.9.1 in c:\python39\lib\site-packages (from keras==2.2.4->plaidml-keras) (1.20.2)
Requirement already satisfied: keras-applications>=1.0.6 in c:\python39\lib\site-packages (from keras==2.2.4->plaidml-keras) (1.0.8)
Requirement already satisfied: pyyaml in c:\python39\lib\site-packages (from keras==2.2.4->plaidml-keras) (5.4.1)
Requirement already satisfied: h5py in c:\python39\lib\site-packages (from keras==2.2.4->plaidml-keras) (3.2.1)
Requirement already satisfied: cffi in c:\python39\lib\site-packages (from plaidml->plaidml-keras) (1.14.5)
Requirement already satisfied: enum34>=1.1.6 in c:\python39\lib\site-packages (from plaidml->plaidml-keras) (1.1.10)
Requirement already satisfied: pycparser in c:\python39\lib\site-packages (from cffi->plaidml->plaidml-keras) (2.20)
C:\Users\anura>plaidml-setup
'plaidml-setup' is not recognized as an internal or external command,
operable program or batch file.
Please can someone help me get through this.
So, I didn't find a solution to the original problem, even after multiple reinstalls. Finally, I uninstalled Python, and installed Anaconda3. Installing plaidml through the Anaconda prompt worked. Sadly my GPU is too old to even be recognized. AMD Radeon HD 7870.
But hey, if any future reader of this post has the same issue, try Anaconda prompt. Its highly probable you have it installed anyways. Happy Coding.

Im Trying to create a Deepfake in Jupyter notebook but its saying a module isn't found

i executed this code:
from demo import load_checkpoints
generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')
after executing, it thrown this error sayng that im missing a module called demo:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-aac07a390ef5> in <module>()
10 import libarchive
11
---> 12 from demo import load_checkpoints
13 generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
14 checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')
ModuleNotFoundError: No module named 'demo'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
I followed the Instructions on the Note. I added one !pip and two !apt commands before the main code.
!pip install cartopy
import cartopy
# https://pypi.python.org/pypi/pydot
!apt-get -qq install -y graphviz && pip install pydot
import pydot
# https://pypi.python.org/pypi/libarchive
!apt-get -qq install -y libarchive-dev && pip install -U libarchive
import libarchive
from demo import load_checkpoints
generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')
but it throws the same error. I dont know what to do now beacuse im doing a school project about Deepfakes and my teacher requested me to make an example of a Deepfake. I found a simple tutorial page about how to do it but they doesnt say a word about errors. I have 0 knowledge about coding so again, i dont know what to do to fix this issue. If someone replies, thanks.
Collecting cartopy
Downloading https://files.pythonhosted.org/packages/46/c1/04e50c9986842f00f7db0e7a65caa896840050d7328f74e5b7437aa01179/Cartopy-0.18.0.tar.gz (14.4MB)
|████████████████████████████████| 14.4MB 229kB/s
Requirement already satisfied: numpy>=1.10 in /usr/local/lib/python3.7/dist-packages (from cartopy) (1.19.5)
Requirement already satisfied: shapely>=1.5.6 in /usr/local/lib/python3.7/dist-packages (from cartopy) (1.7.1)
Collecting pyshp>=1.1.4
Downloading https://files.pythonhosted.org/packages/38/85/fbf87e7aa55103e0d06af756bdbc15cf821fa580414c23142d60a35d4f85/pyshp-2.1.3.tar.gz (219kB)
|████████████████████████████████| 225kB 46.0MB/s
Requirement already satisfied: six>=1.3.0 in /usr/local/lib/python3.7/dist-packages (from cartopy) (1.15.0)
Requirement already satisfied: setuptools>=0.7.2 in /usr/local/lib/python3.7/dist-packages (from cartopy) (54.1.2)
Building wheels for collected packages: cartopy, pyshp
Building wheel for cartopy (setup.py) ... done
Created wheel for cartopy: filename=Cartopy-0.18.0-cp37-cp37m-linux_x86_64.whl size=15127707 sha256=a654609daeabe10086e2283a53e85918564f6eeb193a30c16acc8c117cc7108b
Stored in directory: /root/.cache/pip/wheels/8d/f8/da/2c05136f2162370d2baec85bfbbf91d7729ab9e248da878acd
Building wheel for pyshp (setup.py) ... done
Created wheel for pyshp: filename=pyshp-2.1.3-cp37-none-any.whl size=37264 sha256=fb70034866333f4cb28a6d1a447eddf047eb9e4c0e40afc257fac9d5d1d4b947
Stored in directory: /root/.cache/pip/wheels/76/2b/d4/53e6b9a0fb0a9f9f29664cf82605af8bc81d5ab44d987896dd
Successfully built cartopy pyshp
Installing collected packages: pyshp, cartopy
Successfully installed cartopy-0.18.0 pyshp-2.1.3
Requirement already satisfied: pydot in /usr/local/lib/python3.7/dist-packages (1.3.0)
Requirement already satisfied: pyparsing>=2.1.4 in /usr/local/lib/python3.7/dist-packages (from pydot) (2.4.7)
Selecting previously unselected package libarchive-dev:amd64.
(Reading database ... 160980 files and directories currently installed.)
Preparing to unpack .../libarchive-dev_3.2.2-3.1ubuntu0.6_amd64.deb ...
Unpacking libarchive-dev:amd64 (3.2.2-3.1ubuntu0.6) ...
Setting up libarchive-dev:amd64 (3.2.2-3.1ubuntu0.6) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Collecting libarchive
Downloading https://files.pythonhosted.org/packages/bf/d4/26f5c9835d4d648e4f22b5fb91288457698e928aaf9d4ab7eff405b7ef03/libarchive-0.4.7.tar.gz
Collecting nose
Downloading https://files.pythonhosted.org/packages/15/d8/dd071918c040f50fa1cf80da16423af51ff8ce4a0f2399b7bf8de45ac3d9/nose-1.3.7-py3-none-any.whl (154kB)
|████████████████████████████████| 163kB 6.9MB/s
Building wheels for collected packages: libarchive
Building wheel for libarchive (setup.py) ... done
Created wheel for libarchive: filename=libarchive-0.4.7-cp37-none-any.whl size=31633 sha256=84002f656d8b4ff6394a0b9b122bbba28ce6781884855c6f6b81ac52abef0488
Stored in directory: /root/.cache/pip/wheels/3b/5c/fa/92ee330d259e8fa5bedbd53f67040710fe81cfa463b8711d26
Successfully built libarchive
Installing collected packages: nose, libarchive
Successfully installed libarchive-0.4.7 nose-1.3.7
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-aac07a390ef5> in <module>()
10 import libarchive
11
---> 12 from demo import load_checkpoints
13 generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
14 checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')
ModuleNotFoundError: No module named 'demo'
---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
https://colab.research.google.com/github/AliaksandrSiarohin/first-order-model/blob/master/demo.ipynb#scrollTo=3FQiXqQPWt5B&uniqifier=5
https://www.kapwing.com/resources/baka-mitai-dame-da-ne-meme/
The error you are getting is referring to not being able to import the 'demo' module, and there are two possible reasons for that:
You don't have "demo" installed from the public PyPi repository. This is where publicly available packages are published. The "pip install" command will usually fetch packages from PyPi.
You are are missing part of the codebase for your project -- specifically a file called "demo.py".
In your case, you are missing number 2. The code for the project you are working on is found in the Github repository for the demo, and you can see the file demo.py in the top level of the folder structure. To me, it looks like you didn't actually run the first part of the code:
!git clone https://github.com/AliaksandrSiarohin/first-order-model
Still throwing errors. I also made sure i didnt skip Executing the First Block of Code.
!git clone https://github.com/AliaksandrSiarohin/first-order-model
!pip install demo-py
from demo import load_checkpoints
generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')
fatal: destination path 'first-order-model' already exists and is not an empty directory.
Requirement already satisfied: demo-py in /usr/local/lib/python3.7/dist-packages (0.0.1a8)
Requirement already satisfied: jupyter-contrib-nbextensions in /usr/local/lib/python3.7/dist-packages (from demo-py) (0.5.1)
Requirement already satisfied: spacy>=2.3.2 in /usr/local/lib/python3.7/dist-packages (from demo-py) (3.0.5)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from demo-py) (3.2.2)
Requirement already satisfied: ipywidgets in /usr/local/lib/python3.7/dist-packages (from demo-py) (7.6.3)
Requirement already satisfied: ipython in /usr/local/lib/python3.7/dist-packages (from demo-py) (5.5.0)
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from demo-py) (1.1.5)
Requirement already satisfied: nbconvert>=4.2 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (5.6.1)
Requirement already satisfied: jupyter-nbextensions-configurator>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (0.4.1)
Requirement already satisfied: jupyter-highlight-selected-word>=0.1.1 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (0.2.0)
Requirement already satisfied: jupyter-latex-envs>=1.3.8 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (1.4.6)
Requirement already satisfied: tornado in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (5.1.1)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (3.13)
Requirement already satisfied: ipython-genutils in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (0.2.0)
Requirement already satisfied: jupyter-contrib-core>=0.3.3 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (0.3.3)
Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (4.2.6)
Requirement already satisfied: jupyter-core in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (4.7.1)
Requirement already satisfied: traitlets>=4.1 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (5.0.5)
Requirement already satisfied: notebook>=4.0 in /usr/local/lib/python3.7/dist-packages (from jupyter-contrib-nbextensions->demo-py) (5.3.1)
Requirement already satisfied: catalogue<2.1.0,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (2.0.1)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (2.0.5)
Requirement already satisfied: wasabi<1.1.0,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (0.8.2)
Requirement already satisfied: srsly<3.0.0,>=2.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (2.4.0)
Requirement already satisfied: typing-extensions<4.0.0.0,>=3.7.4; python_version < "3.8" in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (3.7.4.3)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (2.23.0)
Requirement already satisfied: blis<0.8.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (0.4.1)
Requirement already satisfied: typer<0.4.0,>=0.3.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (0.3.2)
Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (4.41.1)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (2.11.3)
Requirement already satisfied: pydantic<1.8.0,>=1.7.1 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (1.7.3)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (3.0.5)
Requirement already satisfied: pathy>=0.3.5 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (0.4.0)
Requirement already satisfied: numpy>=1.15.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (1.19.5)
Requirement already satisfied: thinc<8.1.0,>=8.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (8.0.2)
Requirement already satisfied: spacy-legacy<3.1.0,>=3.0.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (3.0.1)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (1.0.5)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (54.1.2)
Requirement already satisfied: importlib-metadata>=0.20; python_version < "3.8" in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (3.7.2)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.3.2->demo-py) (20.9)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib->demo-py) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->demo-py) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->demo-py) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib->demo-py) (1.3.1)
Requirement already satisfied: ipykernel>=4.5.1 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->demo-py) (4.10.1)
Requirement already satisfied: jupyterlab-widgets>=1.0.0; python_version >= "3.6" in /usr/local/lib/python3.7/dist-packages (from ipywidgets->demo-py) (1.0.0)
Requirement already satisfied: nbformat>=4.2.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->demo-py) (5.1.2)
Requirement already satisfied: widgetsnbextension~=3.5.0 in /usr/local/lib/python3.7/dist-packages (from ipywidgets->demo-py) (3.5.1)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from ipython->demo-py) (1.0.18)
Requirement already satisfied: pickleshare in /usr/local/lib/python3.7/dist-packages (from ipython->demo-py) (0.7.5)
Requirement already satisfied: simplegeneric>0.8 in /usr/local/lib/python3.7/dist-packages (from ipython->demo-py) (0.8.1)
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/local/lib/python3.7/dist-packages (from ipython->demo-py) (4.8.0)
Requirement already satisfied: decorator in /usr/local/lib/python3.7/dist-packages (from ipython->demo-py) (4.4.2)
Requirement already satisfied: pygments in /usr/local/lib/python3.7/dist-packages (from ipython->demo-py) (2.6.1)
Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->demo-py) (2018.9)
Requirement already satisfied: entrypoints>=0.2.2 in /usr/local/lib/python3.7/dist-packages (from nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (0.3)
Requirement already satisfied: testpath in /usr/local/lib/python3.7/dist-packages (from nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (0.4.4)
Requirement already satisfied: defusedxml in /usr/local/lib/python3.7/dist-packages (from nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (0.7.1)
Requirement already satisfied: mistune<2,>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (0.8.4)
Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.7/dist-packages (from nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (1.4.3)
Requirement already satisfied: bleach in /usr/local/lib/python3.7/dist-packages (from nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (3.3.0)
Requirement already satisfied: jupyter-client>=5.2.0 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.0->jupyter-contrib-nbextensions->demo-py) (5.3.5)
Requirement already satisfied: Send2Trash in /usr/local/lib/python3.7/dist-packages (from notebook>=4.0->jupyter-contrib-nbextensions->demo-py) (1.5.0)
Requirement already satisfied: terminado>=0.8.1 in /usr/local/lib/python3.7/dist-packages (from notebook>=4.0->jupyter-contrib-nbextensions->demo-py) (0.9.2)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.3.2->demo-py) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.3.2->demo-py) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.3.2->demo-py) (2.10)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.3.2->demo-py) (1.24.3)
Requirement already satisfied: click<7.2.0,>=7.1.1 in /usr/local/lib/python3.7/dist-packages (from typer<0.4.0,>=0.3.0->spacy>=2.3.2->demo-py) (7.1.2)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2->spacy>=2.3.2->demo-py) (1.1.1)
Requirement already satisfied: smart-open<4.0.0,>=2.2.0 in /usr/local/lib/python3.7/dist-packages (from pathy>=0.3.5->spacy>=2.3.2->demo-py) (3.0.0)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20; python_version < "3.8"->spacy>=2.3.2->demo-py) (3.4.1)
Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from cycler>=0.10->matplotlib->demo-py) (1.15.0)
Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python3.7/dist-packages (from nbformat>=4.2.0->ipywidgets->demo-py) (2.6.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.7/dist-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython->demo-py) (0.2.5)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.7/dist-packages (from pexpect; sys_platform != "win32"->ipython->demo-py) (0.7.0)
Requirement already satisfied: webencodings in /usr/local/lib/python3.7/dist-packages (from bleach->nbconvert>=4.2->jupyter-contrib-nbextensions->demo-py) (0.5.1)
Requirement already satisfied: pyzmq>=13 in /usr/local/lib/python3.7/dist-packages (from jupyter-client>=5.2.0->notebook>=4.0->jupyter-contrib-nbextensions->demo-py) (22.0.3)
ModuleNotFoundError Traceback (most recent call last)
in ()
3 get_ipython().system('pip install demo-py')
4
----> 5 from demo import load_checkpoints
6 generator, kp_detector = load_checkpoints(config_path='config/vox-256.yaml',
7 checkpoint_path='/content/gdrive/My Drive/first-order-motion-model/vox-cpk.pth.tar')
ModuleNotFoundError: No module named 'demo'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
One of my friends recommended me adding demo.py manualy into the Goodgle Drive Folder.
That helped for one try but now i got stuck at "Preform image Animation"
from demo import make_animation
from skimage import img_as_ubyte
predictions = make_animation(source_image, driving_video, generator, kp_detector, relative=True)
#save resulting video
imageio.mimsave('../generated.mp4', [img_as_ubyte(frame) for frame in predictions], fps=fps)
#video can be downloaded from /content folder
HTML(display(source_image, driving_video, predictions).to_html5_video())
Log:
Timestamp Level Message
Mar 25, 2021, 11:09:39 AM WARNING WARNING:root:kernel ce4cbcbb-2a51-4c3f-8e25-24389f444623 restarted
Mar 25, 2021, 11:09:39 AM INFO KernelRestarter: restarting kernel (1/5), keep random ports
Mar 25, 2021, 11:08:13 AM WARNING tcmalloc: large alloc 1345585152 bytes == 0x5601ed3a6000 # 0x7ff6df0431e7 0x7ff6d64b946e 0x7ff6d6509c7b 0x7ff6d6509d97 0x7ff6d65a2887 0x560001d36050 0x560001e2799d 0x560001da9fe9 0x560001da4b0e 0x560001d3777a 0x560001da686a 0x560001da4b0e 0x560001da4813 0x560001da2cc0 0x560001d35ee9 0x560001d35de0 0x560001da9ac2 0x560001da4b0e 0x560001d3777a 0x560001da5c9e 0x560001da4b0e 0x560001d3777a 0x560001da686a 0x560001da4e0d 0x560001d3802c 0x560001d38231 0x560001da71e6 0x560001da4e0d 0x560001d3777a 0x560001da686a 0x560001da4b0e
Mar 25, 2021, 11:08:11 AM WARNING tcmalloc: large alloc 2691170304 bytes == 0x5600dfd8c000 # 0x7ff6df0431e7 0x7ff6d64b946e 0x7ff6d6509c7b 0x7ff6d650ce83 0x7ff6d650d07b 0x7ff6d65ae761 0x560001d36050 0x560001d35de0 0x560001daa244 0x560001da4b0e 0x560001d3777a 0x560001da686a 0x560001da4b0e 0x560001da4813 0x560001da2cc0 0x560001d35ee9 0x560001d35de0 0x560001da9ac2 0x560001da4b0e 0x560001d3777a 0x560001da5c9e 0x560001da4b0e 0x560001d3777a 0x560001da686a 0x560001da4e0d 0x560001d3802c 0x560001d38231 0x560001da71e6 0x560001da4e0d 0x560001d3777a 0x560001da686a
Mar 25, 2021, 11:04:26 AM INFO Adapting to protocol v5.1 for kernel ce4cbcbb-2a51-4c3f-8e25-24389f444623
Mar 25, 2021, 11:04:24 AM INFO Kernel started: ce4cbcbb-2a51-4c3f-8e25-24389f444623
Mar 25, 2021, 11:03:46 AM INFO Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Mar 25, 2021, 11:03:46 AM INFO http://172.28.0.2:9000/
Mar 25, 2021, 11:03:46 AM INFO The Jupyter Notebook is running at:
Mar 25, 2021, 11:03:46 AM INFO 0 active kernels

Python cant find module adbutils

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

Cannot install google-cloud-videointelligence package

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

Categories

Resources