Struggling in importing matplotlib.pyplot [closed] - matplotlib

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm started learning python recently. As the part of that I started learning DATA VISUALIZATION USING PYPLOT.
But while importing matplotlib.pylot in my code It showing an error. I've searched for the solution in online as much as possible but I can't get the solution.
import matplotlib.pyplot as plt
while using this it showing the error message as follow
File "<pyshell#0>", line 1, in <module>
import matplotlib.pyplot as plt
File "C:\Users\Sarwesh\AppData\Roaming\Python\Python38\site-packages\matplotlib\__init__.py", line 174, in <module>
_check_versions()
File "C:\Users\Sarwesh\AppData\Roaming\Python\Python38\site-packages\matplotlib\__init__.py", line 159, in _check_versions
from . import ft2font
ImportError: DLL load failed while importing ft2font: The specified module could not be found.
I've also reinstalled matplotlib
C:\Users\Sarwesh>pip show matplotlib
Name: matplotlib
Version: 3.3.2
Summary: Python plotting package
Home-page: https://matplotlib.org
Author: John D. Hunter, Michael Droettboom
Author-email: matplotlib-users#python.org
License: PSF
Location: c:\users\sarwesh\appdata\roaming\python\python38\site-packages
Requires: numpy, python-dateutil, pyparsing, pillow, kiwisolver, certifi, cycler
Required-by:
"I'm having python-3.8 in my system"
Since I'm a beginner in python please help me to resolve this error.

Finally I get the solution.
I just updated my Microsoft Visual C++ redistributable package
you can get it here
I hope that it will helpful to people those who struggling like me.

Related

GNU Radio Companion not working with most of QT GUI Widgets [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 days ago.
Improve this question
I am running GNU Radio v3.10 on Ubuntu 22.04. However, the QT GUI widgets such as frequency sink, range and many other widgets are displaying an error and therefore the program cannot be executed at all.
For QT GUI range, the errors are:
Failed to evaluate import expression 'from gnuradio.qtgui import Range, RangeWidget\nfrom PyQt5 import QtCore'
For GUI Frequency Sink, the errors are:
Failed to evaluate import expression 'from PyQt5 import Qt\nfrom gnuradio import qtgui\nfrom gnuradio.filter import firdes\nimport sip'
Similar type of errors are also observed for many other QT blocks.
Some of the solutions that I tried:
No import error or mistake issue being observed in /usr/share/.../grc blocks. The code over there is perfect for each block.
Tried uninstalling and re-installing PyQt5 using pip as well as conda.
Enabled permissions to all grc folders as well as started the GRC using sudo.

Even I install tensorflow_federated, I cannot import it [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 days ago.
Improve this question
How can I resolve this error?
I tried to uninstall and install Tensorflow and tensorflow_federated for several times but facing the same error again and again.

How to add hugging face lib to a Kaggle notebook [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
How to add hugging face lib to a Kaggle notebook. I want to add this one to my notebook . the code sample below does not work in the notebook I have. is there some additional step I have missed?
All models of the huggingface model hub are available once you install the library. This one in particular is only available in PyTorch, so you should install both transformers and torch:
!pip install transformers torch
You can then use the model:
from transformers import BartForConditionalGeneration
model = BartForConditionalGeneration.from_pretrained("facebook/bart-large-cnn")
This model is a summarization model so I would recommend reading the summarization tutorial on Hugging Face's website.

Keep getting a SyntaxError message in Tensorflow [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
What is the problem in this code?
I keep getting a SyntaxError on line 33, right after print step.
That print statement will give you an error in Python 3.X because it is no longer a statement, it is a function call.
print('{0} {1} {2} {3}'.format(step, sess.run(cost), sess.run(W), sess.run(b)))
See the python documentation or here for more information.
EDIT: As per late comments above, try changing xrange() to range(), since xrange does not exist in Python 3.

TensorFlow and OpenCL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
It seems TensorFlow only supports CUDA and not OpenCL.
I saw the tensorflow-cl project, which compiles the CUDA code into OpenCL, but it is still a development version which does not work in all cases.
My question is whether Google, TensorFlow's developer, will ever develop a multi-platform version of its tool (no, I do not mean the CPU only version). Are the features of proprietary CUDA so critical to focus on a single GPU vendor? Are there any plans to develop an OpenCL/Vulkan/SPIR-V version at anytime in the future?
The answer is obviously yes, and Tensorflow started supporting OpenCL SYCL in the last few weeks, still in the master github branch and with few basic kernels. Many other kernels need to be written in the new format and contributions are welcome.