Tensorflow error loading after pip install - python

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

Related

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

I need help in installing tensorflow, keras, and pytorch

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

ModuleNotFoundError: No module named 'matplotlib' even when matplotlib is installed

I can't seem to import matplotlib.
import matplotlib
ModuleNotFoundError: No module named 'matplotlib'
Trying conda list matplotlib give the following output:
# Name Version Build Channel
matplotlib 3.1.1 py37_1 conda-forge
matplotlib-base 3.1.1 py37h2852a4a_1 conda-forge
I tried to install it using pip: pip install matplotlib. It resulted in:
Requirement already satisfied: matplotlib in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (3.1.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (1.1.0)
Requirement already satisfied: numpy>=1.11 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (1.16.5)
Requirement already satisfied: python-dateutil>=2.1 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (2.8.0)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from matplotlib) (2.4.2)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (41.4.0)
Requirement already satisfied: six>=1.5 in c:\programdata\anaconda3\envs\tf-gpu\lib\site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)
What should I do?
Edit: I later found that i could import it in my base env. But still can't do it in tf-gpu env

Problems importing quandl module

I am trying to create a Data Science project using some Quandl dataset, but am receiving an error on import.
As i know quandl should be imported all in lowercase, as the documentation states here and here, my import goes as follows:
import quandl
Error:
ModuleNotFoundError: No module named 'quandl'
I installed quandl using pip install quandl. My pip list output is:
Package Version
--------------- ---------
asn1crypto 0.24.0
certifi 2019.6.16
cffi 1.12.3
chardet 3.0.4
cryptography 2.7
idna 2.8
inflection 0.3.1
more-itertools 5.0.0
ndg-httpsclient 0.5.1
numpy 1.16.4
pandas 0.24.2
pip 19.1.1
pyasn1 0.4.5
pycparser 2.19
pyOpenSSL 19.0.0
python-dateutil 2.8.0
pytz 2019.1
Quandl 3.4.8
requests 2.22.0
setuptools 41.0.1
six 1.12.0
urllib3 1.25.3
wheel 0.33.4
wincertstore 0.2
I don't have pip3, as I installed Python through my Anaconda installation. I am running a Jupyter Notebook in a virtual environment I created just for this project. Just so you know, python --version output is:
Python 3.7.3
The strange part occurs when i try running a one line python script with import quandl. This time the program runs without errors, which means that the cause of the ModuleNotFoundError: No module named 'quandl' is the jupyter notebook, which is not being able to properly find the quandl module.
As a last resource, I tried installing quandl inside jupyter notebook:
!pip install quandl
import quandl
Output:
Requirement already satisfied: quandl in c:\users\not_me\.conda\envs\quant\lib\site-packages (3.4.8)
Requirement already satisfied: pandas>=0.14 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (0.24.2)
Requirement already satisfied: pyOpenSSL in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (19.0.0)
Requirement already satisfied: inflection>=0.3.1 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (0.3.1)
Requirement already satisfied: numpy>=1.8 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (1.16.4)
Requirement already satisfied: more-itertools<=5.0.0 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (5.0.0)
Requirement already satisfied: pyasn1 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (0.4.5)
Requirement already satisfied: python-dateutil in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (2.8.0)
Requirement already satisfied: six in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (1.12.0)
Requirement already satisfied: ndg-httpsclient in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (0.5.1)
Requirement already satisfied: requests>=2.7.0 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from quandl) (2.22.0)
Requirement already satisfied: pytz>=2011k in c:\users\not_me\.conda\envs\quant\lib\site-packages (from pandas>=0.14->quandl) (2019.1)
Requirement already satisfied: cryptography>=2.3 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from pyOpenSSL->quandl) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from requests>=2.7.0->quandl) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from requests>=2.7.0->quandl) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from requests>=2.7.0->quandl) (2019.6.16)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from requests>=2.7.0->quandl) (1.25.3)
Requirement already satisfied: asn1crypto>=0.21.0 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from cryptography>=2.3->pyOpenSSL->quandl) (0.24.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\users\not_me\.conda\envs\quant\lib\site-packages (from cryptography>=2.3->pyOpenSSL->quandl) (1.12.3)
Requirement already satisfied: pycparser in c:\users\not_me\.conda\envs\quant\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.3->pyOpenSSL->quandl) (2.19)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-614264e6071a> in <module>
1 get_ipython().system('pip install quandl')
----> 3 import quandl
ModuleNotFoundError: No module named 'quandl'
Try pip3 install quandl . It usually works for Python 3.x
You can use pip using the module syntax rather than the standalone CLI for when you want to make sure you are using the version of pip associated with that interpreter.
python -m pip install quandl
Or, since you are using Conda, you could also try installing quandl with the conda CLI.
conda install quandl (or whatever the package's name is for conda).
Try installing it by running
!pip install quandl
In a cell in a Jupyter notebook. If you have things set up correctly, there's a chance that will be the same version of pip you need.
The problem was that Jupyter was not properly recognizing my virtual environment. I found my answer here, the workaround is pretty self explanatory.

I can't install Jupyter and Matplotlib in my anaconda env

I have an environment of Anaconda (apart of root) and I'm trying to install this two libraries with no success. I tried:
Install libraries by the environment tools of Anaconda Navigator with
'Multiple Errors Encountered.' error. Could I get more info about it? The options that I saw didn't say anything more.
'Multiple Errors Encountered.'
Install Jupyter with the install option of the apps of Anaconda Navigator with the same error too
'Multiple Errors Encountered.'
Install with conda install jupyter and conda install matplotlib in the console and cd where the environment is located. The console
made its process and it said that both libraries were already
installed. I check it in the libraries list of Anaconda Navigator and
it doesn't appear.
(base) C:\Users...>cd C:\Users\Alvaro\Anaconda3\envs\tensorflow
(base) C:\Users...\Anaconda3\envs\tensorflow>conda install
matplotlib Solving environment: done
All requested packages already installed.
(base) C:\Users\Alvaro\Anaconda3\envs\tensorflow>conda install jupyter
Solving environment: done
All requested packages already installed.
Install with pip install jupyter and pip install matplotlib with the similar result than conda install option.
(base) C:\Users\Alvaro\Anaconda3\envs\tensorflow>pip install jupyter Requirement already satisfied: jupyter in
c:\users\alvaro\anaconda3\lib\site-packages (1.0.0) Requirement
already satisfied: notebook in
c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (5.5.0)
Requirement already satisfied: qtconsole in
c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (4.3.1)
Requirement already satisfied: jupyter-console in
c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (5.2.0)
Requirement already satisfied: nbconvert in
c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (5.3.1)
Requirement already satisfied: ipykernel in
c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (4.8.2)
Requirement already satisfied: ipywidgets in
c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (7.2.1)
Requirement already satisfied: jupyter-client>=5.2.0 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(5.2.3) Requirement already satisfied: nbformat in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(4.4.0) Requirement already satisfied: ipython-genutils in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(0.2.0) Requirement already satisfied: Send2Trash in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(1.5.0) Requirement already satisfied: traitlets>=4.2.1 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(4.3.2) Requirement already satisfied: terminado>=0.8.1 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(0.8.1) Requirement already satisfied: jinja2 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(2.10) Requirement already satisfied: jupyter-core>=4.4.0 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(4.4.0) Requirement already satisfied: tornado>=4 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(5.0.2) Requirement already satisfied: pyzmq>=17 in
c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter)
(17.0.0) Requirement already satisfied: ipython in
c:\users\alvaro\anaconda3\lib\site-packages (from
jupyter-console->jupyter) (6.4.0) Requirement already satisfied:
prompt_toolkit<2.0.0,>=1.0.0 in
c:\users\alvaro\anaconda3\lib\site-packages (from
jupyter-console->jupyter) (1.0.15) Requirement already satisfied:
pygments in c:\users\alvaro\anaconda3\lib\site-packages (from
jupyter-console->jupyter) (2.2.0) Requirement already satisfied:
mistune>=0.7.4 in c:\users\alvaro\anaconda3\lib\site-packages (from
nbconvert->jupyter) (0.8.3) Requirement already satisfied:
entrypoints>=0.2.2 in c:\users\alvaro\anaconda3\lib\site-packages
(from nbconvert->jupyter) (0.2.3) Requirement already satisfied:
bleach in c:\users\alvaro\anaconda3\lib\site-packages (from
nbconvert->jupyter) (2.1.3) Requirement already satisfied:
pandocfilters>=1.4.1 in c:\users\alvaro\anaconda3\lib\site-packages
(from nbconvert->jupyter) (1.4.2) Requirement already satisfied:
testpath in c:\users\alvaro\anaconda3\lib\site-packages (from
nbconvert->jupyter) (0.3.1) Requirement already satisfied:
widgetsnbextension~=3.2.0 in
c:\users\alvaro\anaconda3\lib\site-packages (from ipywidgets->jupyter)
(3.2.1) Requirement already satisfied: python-dateutil>=2.1 in
c:\users\alvaro\anaconda3\lib\site-packages (from
jupyter-client>=5.2.0->notebook->jupyter) (2.7.3) Requirement already
satisfied: jsonschema!=2.5.0,>=2.4 in
c:\users\alvaro\anaconda3\lib\site-packages (from
nbformat->notebook->jupyter) (2.6.0) Requirement already satisfied:
six in c:\users\alvaro\anaconda3\lib\site-packages (from
traitlets>=4.2.1->notebook->jupyter) (1.11.0) Requirement already
satisfied: decorator in c:\users\alvaro\anaconda3\lib\site-packages
(from traitlets>=4.2.1->notebook->jupyter) (4.3.0) Requirement already
satisfied: MarkupSafe>=0.23 in
c:\users\alvaro\anaconda3\lib\site-packages (from
jinja2->notebook->jupyter) (1.0) Requirement already satisfied:
setuptools>=18.5 in c:\users\alvaro\anaconda3\lib\site-packages (from
ipython->jupyter-console->jupyter) (39.1.0) Requirement already
satisfied: simplegeneric>0.8 in
c:\users\alvaro\anaconda3\lib\site-packages (from
ipython->jupyter-console->jupyter) (0.8.1) Requirement already
satisfied: backcall in c:\users\alvaro\anaconda3\lib\site-packages
(from ipython->jupyter-console->jupyter) (0.1.0) Requirement already
satisfied: pickleshare in c:\users\alvaro\anaconda3\lib\site-packages
(from ipython->jupyter-console->jupyter) (0.7.4) Requirement already
satisfied: colorama; sys_platform == "win32" in
c:\users\alvaro\anaconda3\lib\site-packages (from
ipython->jupyter-console->jupyter) (0.3.9) Requirement already
satisfied: jedi>=0.10 in c:\users\alvaro\anaconda3\lib\site-packages
(from ipython->jupyter-console->jupyter) (0.12.0) Requirement already
satisfied: wcwidth in c:\users\alvaro\anaconda3\lib\site-packages
(from prompt_toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter) (0.1.7)
Requirement already satisfied:
html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre in c:\users\alvaro\anaconda3\lib\site-packages (from
bleach->nbconvert->jupyter) (1.0.1) Requirement already satisfied:
parso>=0.2.0 in c:\users\alvaro\anaconda3\lib\site-packages (from
jedi>=0.10->ipython->jupyter-console->jupyter) (0.2.0) Requirement
already satisfied: webencodings in
c:\users\alvaro\anaconda3\lib\site-packages (from
html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre->bleach->nbconvert->jupyter)
(0.5.1) distributed 1.21.8 requires msgpack, which is not installed.
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade
pip' command.
Install with PyCharm, with the libraries installation function of the interpreter settings of it. It gets also an error to install:
Install packages failed: Installing packages: error occurred.
Details...
I tried to install other libraries with success (sympy, for example), but I didn't achieve it with Jupyter and Matplotlib.
The root environment has this libraries, but I don't know if I could import from there.
How I should to proceed?
Thank you very much
This blog post explains how to install jupyter into a virtualenv (Disclaimer: I didn't come up with it myself):
http://anbasile.github.io/programming/2017/06/25/jupyter-venv/
In summary:
$ python -m venv projectname
$ source projectname/bin/activate
(venv) $ pip install ipykernel
(venv) $ ipython kernel install --user --name=projectname
I seem to have got it probably.
TLDR: You probably installed jupyter in your base (or root in your language) environment.
I have copied over a small snippet of your messages.
Install with conda install jupyter and conda install matplotlib in the console and cd where the environment is located. The console made its process and it said that both libraries were already installed. I check it in the libraries list of Anaconda Navigator and it doesn't appear.
(base) C:\Users...>cd C:\Users\Alvaro\Anaconda3\envs\tensorflow
(base) C:\Users...\Anaconda3\envs\tensorflow>conda install matplotlib Solving environment: done
All requested packages are already installed.
(base) C:\Users\Alvaro\Anaconda3\envs\tensorflow>conda install jupyter Solving environment: done
Now I am assuming that the above packages really got installed properly.
Why I am doubtful.Solving environment: done is not the last line after a package gets installed.
If you see the first line of each of these messages they all begin with base. This indicates that the packages got installed in the base environment, not your `TensorFlow environment.
So you really won't find them in your `TensorFlow environment.
It would help if you also answer my questions in the comments below the question.

Categories

Resources