OSError: libDTKLPR5.so: cannot open shared object file: No such file or directory - operating-system

enter image description heretrying to use cdll.LoadLibrary function in Python 3.11.0 in Ubuntu 22.04.1 LTS 64-bit.
Below error occured. If you have faced this kind of issue please help.
Traceback (most recent call last):
File "/home/*****/Desktop/python-camera-app-latest/radius-camera-app/main.py", line 10, in <module>
main()
File "/home/*****/Desktop/python-camera-app-latest/radius-camera-app/main.py", line 5, in main
handler = DTKVideoStreamHandler()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/*****/Desktop/python-camera-app-latest/radius-camera-app/Services/Implements/DTKVideoStreamHandler.py", line 28, in _init_
self.__DTKLPR = cdll.LoadLibrary(DTKLPR5Lib)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/ctypes/_init_.py", line 454, in LoadLibrary
return self._dlltype(name)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/ctypes/_init.py", line 376, in __init_
self._handle = _dlopen(self._name, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: libDTKLPR5.so: cannot open shared object file: No such file or director
Thanks in advance...
In windows 10 64-bit. There is some kind of solution with using
os.add_dll_directory(full_path)
before calling
self.__DTKLPR = cdll.LoadLibrary(DTKLPR5Lib)
but this solution is not working in Ubuntu. Because add_dll_directory is supposed to only windows. (Based on information in its documentation)

Related

Unable to convert Python to Window Based app .exe

I'm converting my Main.py python code to .exe application and I need to load ids.txt there are some values line by line, but after converting is done the Auto-py-to-exe-master free Github app says this error message:
Traceback (most recent call last):
File "main.py", line 37, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\janka\\AppData\\Local\\Temp\\_MEI200202\\base_library.zip\\ids.txt'
By the way my file location of ids.txt is called in other directory and from application path as follows:
with open(os.path.join(sys.path[0], "ids.txt"), "r") as f:
devIds = f.read().splitlines()

Error encountered when using Autodock/Vina Plugin in PyMOL

I am a beginner to PyMOL and I am using it for my docking project. I have encountered errors using the Autodock/Vina plugin in PyMOL.
I was trying to carry out the set up for the grid and Error 1 occurred when I was clicking on the arrow that allows me to change the grid parameter x,y and z.
As for Error 2, it occurs when I tried to generate the receptor on the next page.
Under the log section, I also got a notice saying "Batch: prepare_receptor4.py -r C:\Users\User\Desktop\plugin-test\receptor.3ig7.pdb -o C:\Users\User\Desktop\plugin-test\receptor.3ig7.pdbqt -A checkhydrogen"
It would be appreciated if you would tell me what is missing or should be done to solve these errors.
I look forward to reading any of your replies and I thank you in advance,
Elayne
Error: 1
TypeError Exception in Tk callback
Function: <bound method Autodock.n_points_Y_changed of <pmg_tk.startup.autodock_plugin.Autodock object at 0x0000020649CD9388>> (type: <class 'method'>)
Args: ('scroll', '1', 'units')
Traceback (innermost last):
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\Pmw.py", line 1823, in __call__
return self.func(*args)
TypeError: n_points_Y_changed() takes 2 positional arguments but 4 were given
Error: 2
FileNotFoundError Exception in Tk callback
Function: <bound method Autodock.generate_receptor of <pmg_tk.startup.autodock_plugin.Autodock object at 0x0000020649CD9388>> (type: <class 'method'>)
Args: ()
Traceback (innermost last):
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\Pmw.py", line 1823, in __call__
return self.func(*args)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\autodock_plugin.py", line 1940, in generate_receptor
result, output = getstatusoutput(command)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\site-packages\pmg_tk\startup\autodock_plugin.py", line 85, in getstatusoutput
p = Popen(args, stdout=PIPE, stderr=STDOUT, stdin=PIPE, env=env)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\User\AppData\Local\Schrodinger\PyMOL2\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I'm also encountering the same issue on Windows, try running a linux distro on vmware and make sure to install Pymol with support for Python 2.7 because the script is not compatible with Python3.

Running canopy-script.pyw gives traceback "No module named canopy.app.bootstrap"

I am trying to follow instruction from Enthought support website To test of what I have done i run line:
_python.exe canopy-script.pyw -d
Unfortunately this gives Traceback:
Traceback (most recent call last):
File "canopy-script.pyw", line 776, in <module>
File "canopy-script.pyw", line 336, in bootstrap
File "canopy-script.pyw", line 363, in chainload
File "canopy-script.pyw", line 762, in _chainload
File "C:\Users\User\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.7.4.3348.win-x86_64\Canopy-script.pyw", line 7, in <module>
from canopy.app.bootstrap import main
ImportError: No module named canopy.app.bootstrap
After "Search" I can see many of bootstrap.py files on the disc.
What would be the solution for this problem?
The current version of Canopy is 2.1.9. (You are running v 1.7.4).
To update Canopy, and for a link to release notes, please see "Installing a new Canopy version".
After you update, see:
https://support.enthought.com/hc/en-us/articles/360021798791--UnresolvableRequirements-or-Conflicting-requirements-when-installing-or-updating-packages

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 when creating virtualenv folder

I am working through the book Test Driven Devlopement, and am currently having a problem when I try to create a virtualenv folder using:
virtualenv --python=python3 ../virtualenv
I keep on getting this output:
Traceback (most recent call last):
File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python33\lib\runpy.py", line 73, in _run_code
exec(code, run_globals)
File "C:\Python33\Scripts\virtualenv.exe\__main__.py", line 9, in <module>
File "C:\Python33\lib\site-packages\virtualenv.py", line 774, in main
interpreter = resolve_interpreter(options.python)
File "C:\Python33\lib\site-packages\virtualenv.py", line 1575, in resolve_interpreter
python_versions = get_installed_pythons()
File "C:\Python33\lib\site-packages\virtualenv.py", line 93, in get_installed_pythons
path = winreg.QueryValue(python_core, "%s\\InstallPath" % ver)
FileNotFoundError: [WinError 2] The system cannot find the file specified
You are on windows: ../virutalenv is for unix
On unix, you are telling virtualenv to create a virtualenv directory in the directory up one level (previous) also windows uses backslash instead of slash.
Try to find a tutorial that is windows oriented, or if you can get your hand on a unix/linux machine, or maybe install cygwin.