when i run trt_yolo.py code it gives an error - pycuda

I am getting error when I running yolo.trt file how can I fix that.
Traceback (most recent call last):
File "yolo_trt.py", line 8, in
from utils.yolo_with_plugins import TrtYOLO
File "/home/oret/tensorrt_demos/utils/yolo_with_plugins.py", line 14, in
import pycuda.driver as cuda
ModuleNotFoundError: No module named 'pycuda'
RTX 3060

Related

ImportError: cannot import name 'ranked_blast_output_schema' from 'param'

I am just getting started on Python, though I know a bit of R. I want to replicate something someone has already done. I am receiving this error on one of my kernels on Jupyter and I don't immediately know what to do about it. Does anyone have any input or experience with it?
Traceback (most recent call last):
File "parse.py", line 8, in <module>
from param import ranked_blast_output_schema, blast_outfmt6_schema
ImportError: cannot import name 'ranked_blast_output_schema' from 'param' (/Users/myaccount/miniconda3/lib/python3.8/site-packages/param/__init__.py)
Traceback (most recent call last):
File "lca_analysis.py", line 52, in <module>
if ("~" in blast_results["query"].iloc[0]):
File "/Users/myaccount/miniconda3/lib/python3.8/site-packages/pandas/core/indexing.py", line 894, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "/Users/myaccount/miniconda3/lib/python3.8/site-packages/pandas/core/indexing.py", line 1500, in _getitem_axis
self._validate_integer(key, axis)
File "/Users/myaccount/miniconda3/lib/python3.8/site-packages/pandas/core/indexing.py", line 1443, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
Ah okay. I am replicating a Jupyter notebook and I was told to run this link on bash.
lca_analysis.py --blast_type nt --fpath s3://org_name/contigs/CMS001_002_Ra_S1/blast_nt.m9 --filtered_blast_path s3://bucket_name/contig_quality/CMS001_002_Ra_S1/blast_nt_filtered.m9 --excluded_contigs_path s3://bucket_name/contig_quality/CMS001_002_Ra_S1/exclude_contigs_nt.txt --outpath s3://bucket_name/contig_quality/CMS001_002_Ra_S1/lca_nt.m9 --read_count_path s3://bucket_name/contigs/CMS001_002_Ra_S1/contig_stats.json --verbose True
But then, I had this error
Read counts have been loaded: s3://bucket_name/contigs/CMS001_002_Ra_S1/contig_stats.json| elapsed time: 0.73 seconds
/var/folders/ns/gdtc2hvx1g13_29wct4qkhd80000gq/T/tmp3m3k6w9o blast file downloaded to this tempfile
Traceback (most recent call last):
File "parse.py", line 8, in <module>
from param import ranked_blast_output_schema, blast_outfmt6_schema
ImportError: cannot import name 'ranked_blast_output_schema' from 'param' (/Users/myaccount/miniconda3/lib/python3.8/site-packages/param/__init__.py)
Traceback (most recent call last):
File "lca_analysis.py", line 52, in <module>
if ("~" in blast_results["query"].iloc[0]):
File "/Users/myaccount/miniconda3/lib/python3.8/site-packages/pandas/core/indexing.py", line 894, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "/Users/myaccount/miniconda3/lib/python3.8/site-packages/pandas/core/indexing.py", line 1500, in _getitem_axis
self._validate_integer(key, axis)
File "/Users/myaccount/miniconda3/lib/python3.8/site-packages/pandas/core/indexing.py", line 1443, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
I had just used pip install param to get param, and the install went just fine.

import error in python user interface, thony and pycharm

while importing tensor flow as import tensorflow it raise an error,:
import tensorflow
Traceback (most recent call last):
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\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.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow_init_.py", line 41, in
from tensorflow.python.tools import module_util as module_util
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python_init.py", line 40, in
from tensorflow.python.eager import context
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\eager\context.py", line 35, in
from tensorflow.python import pywrap_tfe
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\pywrap_tfe.py", line 28, in
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 83, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Amit Maurya\AppData\Local\Programs\Python\Python38\lib\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.
I've had similar issue but I'm not sure if the solution is applicable here, too. Anyway, I'd suggest to install the MS Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 if you haven't done it yet.
You can find the redistributable here.

Aws Cloudwatch Logs agent throws an error

I'm setting up awslogs agent on ec2 instance, When i run the python script of awslogs. I'm getting below message.
Downloading the latest CloudWatch Logs agent bits ... ERROR: Failed to create virtualenv. Try manually installing with pip and adding it to the sudo user's PATH before running this script.
And awslogs-agent-setup.log show below error.
Environment: CentOS 6.10 and Python 2.6
Traceback (most recent call last):
File "/usr/bin/pip", line 7, in <module>
from pip._internal import main
File "/usr/lib/python2.6/site-packages/pip-19.0.3-py2.6.egg/pip/_internal/__init__.py", line 19, in <module>
from pip._vendor.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.6/site-packages/pip-19.0.3-py2.6.egg/pip/_vendor/urllib3/__init__.py", line 8, in <module>
from .connectionpool import (
File "/usr/lib/python2.6/site-packages/pip-19.0.3-py2.6.egg/pip/_vendor/urllib3/connectionpool.py", line 92
_blocking_errnos = {errno.EAGAIN, errno.EWOULDBLOCK}
^
SyntaxError: invalid syntax
/usr/bin/virtualenv
Traceback (most recent call last):
File "/usr/bin/virtualenv", line 7, in <module>
from virtualenv import main
File "/usr/lib/python2.6/site-packages/virtualenv.py", line 51, in <module>
print("ERROR: {}".format(sys.exc_info()[1]))
ValueError: zero length field name in format
Basically, this error is due to your python version 2.6. Could you please update your python version from 2.6 to 2.7 or 3.1.
This should help.

Error while installing Flutter in Linux

I set the path variable and echo the path and it give me expected output
uttu#Lore-UK:~/flutter$ export PATH=`pwd`/flutter/bin:$PATH
uttu#Lore-UK:~/flutter$ echo $PATH
/home/uttu/flutter/flutter/bin:/home/uttu/home/flutter/bin:/home/uttu/flutter/flutter/bin:/home/uttu/home/flutter/bin:/home/uttu/.local/share/umake/bin:/home/uttu/bin:/home/uttu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
but when I ran flutter doctor it show
$ flutter doctor
Traceback (most recent call last):
File "/usr/lib/python3.5/dbm/gnu.py", line 4, in <module>
from _gdbm import *
ImportError: No module named '_gdbm'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 7, in <module>
import dbm.gnu as gdbm
File "/usr/lib/python3.5/dbm/gnu.py", line 6, in <module>
raise ImportError(str(msg) + ', please install the python3-gdbm package')
ImportError: No module named '_gdbm', please install the python3-gdbm package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 27, in <module>
from CommandNotFound.util import crash_guard
File "/usr/lib/python3/dist-packages/CommandNotFound/__init__.py", line 3, in <module>
from CommandNotFound.CommandNotFound import CommandNotFound
File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 9, in <module>
import gdbm
ImportError: No module named 'gdbm'
I am not able to understand why I am getting this error and how to solve it
Thank you in advance
As you can see in your error message you are missing the module 'gdbm' as it says here:
please install the python3-gdbm package
Try installing this module and running flutter doctor again.
Other people have had the same problem Here

Is enthought.mayavi.mlab broken?

I used to be able to do this in EPD, but this does not work in Canopy. Am I missing something? Thanks,
from enthought.mayavi import mlab
Traceback (most recent call last):
File "", line 1, in
File "/home-research/jkitchin/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enthought/mayavi/mlab.py", line 3, in
from mayavi.mlab import *
ImportError: No module named mayavi.mlab
from enthought.mayavi.mlab import *
Traceback (most recent call last):
File "", line 1, in
File "/home-research/jkitchin/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/enthought/mayavi/mlab.py", line 3, in
from mayavi.mlab import *
ImportError: No module named mayavi.mlab
Are you sure Mayav is installed. The enthought namespace has been removed some time ago. You probably have ETSProxy installed but not Mayavi. Can you check in the package manager?