When I import Tensorflow, Keras or Pytorch I face these errors:
I'm using Window 10 and my CPU supports AVX.
Also I was preparing my project on Python(Anaconda) and installed Keras, TensorFlow using pip(pip install keras) and Pytorch using conda
I activated my virtual environment(Test_01) before download, and I checked it again with conda list after download.
After checking those 3 programs are installed, I imported them with ipython on Anaconda prompt. and this what I faced:
========================================================================
(Test_01) C:\Users\User>ipython
Python 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import tensorflow
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-d6579f534729> in <module>
----> 1 import tensorflow
ModuleNotFoundError: No module named 'tensorflow'
In [2]: import keras
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
C:\Anaconda3\lib\site-packages\keras\__init__.py in <module>
2 try:
----> 3 from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
ModuleNotFoundError: No module named 'tensorflow'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
<ipython-input-2-88d96843a926> in <module>
----> 1 import keras
C:\Anaconda3\lib\site-packages\keras\__init__.py in <module>
3 from tensorflow.keras.layers.experimental.preprocessing import RandomRotation
4 except ImportError:
----> 5 raise ImportError(
6 'Keras requires TensorFlow 2.2 or higher. '
7 'Install TensorFlow via `pip install tensorflow`')
ImportError: Keras requires TensorFlow 2.2 or higher. Install TensorFlow via `pip install tensorflow`
In [3]: import torch
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-eb42ca6e4af3> in <module>
----> 1 import torch
ModuleNotFoundError: No module named 'torch'
===========================================================================
Keras error message says:
Keras requires TensorFlow 2.2 or higher. Install TensorFlow via
pip install TensorFlow
also, tensorflow and pytorch says
ModuleNotFoundError: No module named 'tensorflow'
ModuleNotFoundError: No module named 'torch'
So I installed TensorFlow with pip again, and it says:
(Test_01) C:\Users\User>pip install tensorflow
Requirement already satisfied: tensorflow in c:\anaconda3\envs\test_01\lib\site-packages (2.3.1)
Requirement already satisfied: grpcio>=1.8.6 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (1.33.2)
Requirement already satisfied: wrapt>=1.11.1 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (1.12.1)
Requirement already satisfied: gast==0.3.3 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: protobuf>=3.9.2 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (3.13.0)
Requirement already satisfied: tensorboard<3,>=2.3.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: google-pasta>=0.1.8 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: absl-py>=0.7.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (0.11.0)
Requirement already satisfied: six>=1.12.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (1.15.0)
Requirement already satisfied: wheel>=0.26 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (0.35.1)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (1.1.2)
Collecting numpy<1.19.0,>=1.16.0
Using cached numpy-1.18.5-cp38-cp38-win_amd64.whl (12.8 MB)
Requirement already satisfied: termcolor>=1.1.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: astunparse==1.6.3 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorflow) (2.10.0)
Requirement already satisfied: setuptools in c:\anaconda3\envs\test_01\lib\site-packages (from protobuf>=3.9.2->tensorflow) (50.3.0.post20201006)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.4.2)
Requirement already satisfied: markdown>=2.6.8 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (3.3.3)
Requirement already satisfied: requests<3,>=2.21.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.24.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.23.0)
Requirement already satisfied: werkzeug>=0.11.15 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.0.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\anaconda3\envs\test_01\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.7.0)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\anaconda3\envs\test_01\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (1.3.0)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\anaconda3\envs\test_01\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.25.11)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\anaconda3\envs\test_01\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\anaconda3\envs\test_01\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in c:\anaconda3\envs\test_01\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.10)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\anaconda3\envs\test_01\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.1.1)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\anaconda3\envs\test_01\lib\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:\anaconda3\envs\test_01\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.6)
Requirement already satisfied: oauthlib>=3.0.0 in c:\anaconda3\envs\test_01\lib\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:\anaconda3\envs\test_01\lib\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: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.19.2
Uninstalling numpy-1.19.2:
Successfully uninstalled numpy-1.19.2
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
torch 1.6.0 requires future, which is not installed.
Successfully installed numpy-1.18.5
===============================================================================
I promise I checked that I installed and executed them on same environment(Test_01) so Can you tell me:
What Should I do ? and How can I check my 'CUDA' version? I tried it with 'nvxx --version' on cmd and nothing works
First, i should thank you all of you made comment in my post.
I found that visual studio c++ was not installed, so i installed it to my labtop.
You can found it here
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Related
Hi I've installed Alpha Vantage I'm getting an error when importing alpha_vantage into my Anaconda project:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_18576/239330141.py in <module>
----> 1 from aplha_vantage import TimeSeries
ModuleNotFoundError: No module named 'aplha_vantage'
Here's how I've installed it:
(base) C:\Users\audac>cd Documents/trading/code
(base) C:\Users\audac\Documents\trading\code>cd stock-scanner-py
(base) C:\Users\audac\Documents\trading\code\stock-scanner-py>cd algorithmic-trading-python
(base) C:\Users\audac\Documents\trading\code\stock-scanner-py\algorithmic-trading-python>pip install alpha_vantage
Requirement already satisfied: alpha_vantage in c:\users\audac\anaconda3\lib\site-packages (2.3.1)
Requirement already satisfied: requests in c:\users\audac\anaconda3\lib\site-packages (from alpha_vantage) (2.26.0)
Requirement already satisfied: aiohttp in c:\users\audac\anaconda3\lib\site-packages (from alpha_vantage) (3.8.1)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (2.0.4)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (6.0.1)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (1.3.0)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (1.7.2)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (1.2.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (4.0.2)
Requirement already satisfied: attrs>=17.3.0 in c:\users\audac\anaconda3\lib\site-packages (from aiohttp->alpha_vantage) (21.2.0)
Requirement already satisfied: idna>=2.0 in c:\users\audac\anaconda3\lib\site-packages (from yarl<2.0,>=1.0->aiohttp->alpha_vantage) (3.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\audac\anaconda3\lib\site-packages (from requests->alpha_vantage) (1.26.7)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\audac\anaconda3\lib\site-packages (from requests->alpha_vantage) (2021.10.8)
(base) C:\Users\audac\Documents\trading\code\stock-scanner-py\algorithmic-trading-python>
I've also tried uninstalling Python and all packages + reinstalling them but I still have the same issue. It only happens with the Alpha Vantage package, everything else works fine.
What am I doing wrong?
Spelling error:
aplha_vantage --> alpha_vantage
i.e.
from alpha_vantage import TimeSeries
i 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
I am using python 3.6.0, when importing the sklearn, it shows No module named 'sklearn'.
But I have installed the package in the interpreter, what can I do?
Thanks!
(env) (base) MacBook:$ pip3 install sklearn
Requirement already satisfied: sklearn in ./env/lib/python3.6/site-packages (0.0)
Requirement already satisfied: scikit-learn in ./env/lib/python3.6/site-packages (from sklearn) (0.23.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./env/lib/python3.6/site-packages (from scikit-learn->sklearn) (2.1.0)
Requirement already satisfied: numpy>=1.13.3 in ./env/lib/python3.6/site-packages (from scikit-learn->sklearn) (1.19.1)
Requirement already satisfied: joblib>=0.11 in ./env/lib/python3.6/site-packages (from scikit-learn->sklearn) (0.16.0)
Requirement already satisfied: scipy>=0.19.1 in ./env/lib/python3.6/site-packages (from scikit-learn->sklearn) (1.5.2)
I've created a conda virtual environment using python 3.7.6. I'm operating on Windows 10 CPU.
Original install failed under pip install tensorflow. pip suggested trying pip install tensorflow --user
which worked.
pip install tensorflow
Requirement already satisfied: tensorflow in c:\users\acsavag\appdata\roaming\python\python38\site-packages (2.3.0)Note: you may need to restart the kernel to use updated packages.
Requirement already satisfied: astunparse==1.6.3 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (1.6.3)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (3.3.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (1.1.0)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (0.9.0)
Requirement already satisfied: six>=1.12.0 in c:\users\acsavag\anaconda3\envs\best\lib\site-packages (from tensorflow) (1.15.0)
Requirement already satisfied: wheel>=0.26 in c:\users\acsavag\anaconda3\envs\best\lib\site-packages (from tensorflow) (0.34.2)
Requirement already satisfied: tensorboard<3,>=2.3.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: google-pasta>=0.1.8 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (0.2.0)
Requirement already satisfied: wrapt>=1.11.1 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (1.12.1)
Requirement already satisfied: grpcio>=1.8.6 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (1.30.0)
Requirement already satisfied: protobuf>=3.9.2 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (3.12.4)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (2.10.0)
Requirement already satisfied: scipy==1.4.1 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (1.4.1)
Requirement already satisfied: gast==0.3.3 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: numpy<1.19.0,>=1.16.0 in c:\users\acsavag\anaconda3\envs\best\lib\site-packages (from tensorflow) (1.18.5)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorflow) (1.1.2)
Requirement already satisfied: requests<3,>=2.21.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.24.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.4.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.7.0)
Requirement already satisfied: werkzeug>=0.11.15 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.0.1)
Requirement already satisfied: setuptools>=41.0.0 in c:\users\acsavag\anaconda3\envs\best\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (49.2.0.post20200714)
Requirement already satisfied: google-auth<2,>=1.6.3 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.20.0)
Requirement already satisfied: markdown>=2.6.8 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (3.2.2)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\acsavag\anaconda3\envs\best\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2020.6.20)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.25.10)
Requirement already satisfied: idna<3,>=2.5 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4)
Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (1.3.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in c:\users\acsavag\appdata\roaming\python\python38\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.1.1)
Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\users\acsavag\appdata\roaming\python\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\acsavag\appdata\roaming\python\python38\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.6)
Requirement already satisfied: oauthlib>=3.0.0 in c:\users\acsavag\appdata\roaming\python\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\acsavag\appdata\roaming\python\python38\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.4.8)
I've restarted the environment to ensure that's not the issue.
pip list
Package Version
---------------------- -------------------
absl-py 0.9.0
astunparse 1.6.3
backcall 0.2.0
cachetools 4.1.1
certifi 2020.6.20
chardet 3.0.4
colorama 0.4.3
decorator 4.4.2
gast 0.3.3
google-auth 1.20.0
google-auth-oauthlib 0.4.1
google-pasta 0.2.0
grpcio 1.30.0
h5py 2.10.0
idna 2.10
ipykernel 5.3.3
ipython 7.16.1
ipython-genutils 0.2.0
jedi 0.17.1
jupyter-client 6.1.6
jupyter-core 4.6.3
Keras-Preprocessing 1.1.2
Note: you may need to restart the kernel to use updated packages.Markdown 3.2.2
numpy 1.18.5
oauthlib 3.1.0
opt-einsum 3.3.0
pandas 1.1.0
parso 0.7.0
pickleshare 0.7.5
pip 20.1.1
prompt-toolkit 3.0.5
protobuf 3.12.4
pyasn1 0.4.8
pyasn1-modules 0.2.8
Pygments 2.6.1
python-dateutil 2.8.1
pytz 2020.1
pywin32 227
pywrap 0.1.0
pyzmq 19.0.1
requests 2.24.0
requests-oauthlib 1.3.0
rsa 4.6
scipy 1.4.1
setuptools 49.2.0.post20200714
six 1.15.0
tensorboard 2.3.0
tensorboard-plugin-wit 1.7.0
tensorflow 2.3.0
tensorflow-estimator 2.3.0
termcolor 1.1.0
tornado 6.0.4
traitlets 4.3.3
urllib3 1.25.10
wcwidth 0.2.5
Werkzeug 1.0.1
wheel 0.34.2
wincertstore 0.2
wrapt 1.12.1
TensorFlow and its subsequent dependencies are successfully installed
import tensorflow
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py in
63 try:
---> 64 from tensorflow.python._pywrap_tensorflow_internal import *
65 # This try catch logic is because there is no bazel equivalent for py_extension.
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
Untitled-1 in
----> 1 import tensorflow
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\__init__.py in
39 import sys as _sys
40
---> 41 from tensorflow.python.tools import module_util as _module_util
42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader
43
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\__init__.py in
38 # pylint: disable=wildcard-import,g-bad-import-order,g-import-not-at-top
39
---> 40 from tensorflow.python.eager import context
41
42 # pylint: enable=wildcard-import
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\eager\context.py in
33 from tensorflow.core.protobuf import config_pb2
34 from tensorflow.core.protobuf import rewriter_config_pb2
---> 35 from tensorflow.python import pywrap_tfe
36 from tensorflow.python import tf2
37 from tensorflow.python.client import pywrap_tf_session
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tfe.py in
26
27 # pylint: disable=invalid-import-order,g-bad-import-order, wildcard-import, unused-import
---> 28 from tensorflow.python import pywrap_tensorflow
29 from tensorflow.python._pywrap_tfe import *
~\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py in
81 for some common reasons and solutions. Include the entire stack trace
82 above this error message when asking for help.""" % traceback.format_exc()
---> 83 raise ImportError(msg)
84
85 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long
ImportError: Traceback (most recent call last):
File "C:\Users\acsavag\AppData\Roaming\Python\Python38\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in
from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
I've tried to trace back the errors in the code to determine the first true breakpoint, but unfortunately all dependencies that are being searched for are in the right place.
I downloaded the latest MSVC 2019 64 bit and it worked.
Lot's of github issues have the same error question, and many just referenced about 10 ticket clones.
https://github.com/tensorflow/tensorflow/issues/36167 <- this one lists 4 possible scenarios this issue arises and working down it like a checklist helps!
Try deleting the TensorFlow library file manually and reinstall it using pip
i'm having this error problem, i have ran this script in jupyter notebook in base (root) environment, the log said that gensim library has been installed and i have run the command !pip install gensim before i import it, but it still can not be imported, and the error said ModuleNotFoundError: No module named 'gensim'
!pip install gensim
import gensim
from gensim.models import KeyedVectors
model = KeyedVectors.load('model_fasttext2.vec')
model.vector_size
------------------------------------------------------------------------
Requirement already satisfied: gensim in c:\users\ip-03\anaconda3\lib\site-packages (3.8.1)
Requirement already satisfied: scipy>=0.18.1 in c:\users\ip-03\anaconda3\lib\site-packages (from gensim) (1.4.1)
Requirement already satisfied: six>=1.5.0 in c:\users\ip-03\anaconda3\lib\site-packages (from gensim) (1.14.0)
Requirement already satisfied: smart-open>=1.8.1 in c:\users\ip-03\anaconda3\lib\site-packages (from gensim) (1.9.0)
Requirement already satisfied: numpy>=1.11.3 in c:\users\ip-03\anaconda3\lib\site-packages (from gensim) (1.18.1)
Requirement already satisfied: boto>=2.32 in c:\users\ip-03\anaconda3\lib\site-packages (from smart-open>=1.8.1->gensim) (2.49.0)
Requirement already satisfied: boto3 in c:\users\ip-03\anaconda3\lib\site-packages (from smart-open>=1.8.1->gensim) (1.12.3)
Requirement already satisfied: bz2file in c:\users\ip-03\anaconda3\lib\site-packages (from smart-open>=1.8.1->gensim) (0.98)
Requirement already satisfied: requests in c:\users\ip-03\anaconda3\lib\site-packages (from smart-open>=1.8.1->gensim) (2.22.0)
Requirement already satisfied: s3transfer<0.4.0,>=0.3.0 in c:\users\ip-03\anaconda3\lib\site-packages (from boto3->smart-open>=1.8.1->gensim) (0.3.3)
Requirement already satisfied: botocore<1.16.0,>=1.15.3 in c:\users\ip-03\anaconda3\lib\site-packages (from boto3->smart-open>=1.8.1->gensim) (1.15.3)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in c:\users\ip-03\anaconda3\lib\site-packages (from boto3->smart-open>=1.8.1->gensim) (0.9.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\ip-03\anaconda3\lib\site-packages (from requests->smart-open>=1.8.1->gensim) (2019.11.28)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\ip-03\anaconda3\lib\site-packages (from requests->smart-open>=1.8.1->gensim) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\ip-03\anaconda3\lib\site-packages (from requests->smart-open>=1.8.1->gensim) (1.25.8)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\ip-03\anaconda3\lib\site-packages (from requests->smart-open>=1.8.1->gensim) (2.8)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in c:\users\ip-03\anaconda3\lib\site-packages (from botocore<1.16.0,>=1.15.3->boto3->smart-open>=1.8.1->gensim) (2.8.1)
Requirement already satisfied: docutils<0.16,>=0.10 in c:\users\ip-03\anaconda3\lib\site-packages (from botocore<1.16.0,>=1.15.3->boto3->smart-open>=1.8.1->gensim) (0.15.2)
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-10-ee4a48d372cd> in <module>
1 get_ipython().system('pip install gensim')
----> 2 import gensim
3 from gensim.models import KeyedVectors
4 model = KeyedVectors.load('model_fasttext2.vec')
5 model.vector_size
ModuleNotFoundError: No module named 'gensim'
Is there anyone who can help this problem? i will really appreciate your help, it will help my thesis work, thank you for your attention
It may be that your jupyter lab maybe running the base kernel and not the kernel of the virtual environment.
Check by doing the following:
import sys
sys.executable
into my notebook and got the result
'/anaconda3/bin/python'
If you get the above instead of the below then that means you're using the wrong kernel.
'/anaconda3/envs/myenv/bin/python'
You can solve it by creating a new iPython kernel for your new environment. Read more here.
conda install -n myenv ipython
conda activate myenv
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"
```Then, to run Jupyter Lab in the new environment: