Python No module named 'Input' - python

my error is
Traceback (most recent call last):
File "/home/shin/.local/bin/fextractor", line 4, in <module>
__import__('pkg_resources').run_script('VDiscover==0.1', 'fextractor')
File "/home/shin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 672, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/home/shin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1472, in run_script
exec(code, namespace, namespace)
File "/home/shin/.local/lib/python3.8/site-packages/VDiscover-0.1-py3.8.egg/EGG-INFO/scripts/fextractor", line 28, in <module>
from vdiscover.Detection import GetArgs, GetFiles, GetCmd
File "/home/shin/.local/lib/python3.8/site-packages/VDiscover-0.1-py3.8.egg/vdiscover/Detection.py", line 24, in <module>
from Input import Arg, File
ModuleNotFoundError: No module named 'Input'
I think it is related to the input library, so I did pip install input and added the path(./.local/lib/python3.8/site-packages) to the PATH.
But it seems to be a different issue. Could I possibly know a solution?

Related

Setting up conan in a fresh gitlab container

I have been attempting to get conan running inside of a docker container that also runs gitlab. I have been attempting to follow these two guides here:
https://docs.gitlab.com/omnibus/docker/ ****Using the Selinux version, im on RHEL 7
https://docs.gitlab.com/ee/user/packages/conan_repository/ *********Only get as far as the actual installing of conan
Whenever I then try to run the conan --version command I get an error message stating "no module named _sqlite3". So in order to try and fix that I have tried installing pysqlite3, libsqlite-dev, sqlite3, pretty much any sqlite named package (within the container of course) I can think of but to no success.
Here is the actual stack trace from the conan call in the event that it may give someone some insight into my issue.
Traceback (most recent call last):
File "/opt/gitlab/embedded/bin/conan", line 33, in <module>
sys.exit(load_entry_point('conan==1.32.0', 'console_scripts', 'conan')())
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2447, in load
return self.resolve()
File "/opt/gitlab/embedded/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2453, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/conan.py", line 7, in <module>
from conans.client.command import main
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/command.py", line 16, in <module>
from conans.client.conan_api import Conan, default_manifest_folder, _make_abs_path, ProfileData
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/conan_api.py", line 11, in <module>
from conans.client.cache.cache import ClientCache
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/cache/cache.py", line 16, in <module>
from conans.client.store.localdb import LocalDB
File "/opt/gitlab/embedded/lib/python3.7/site-packages/conans/client/store/localdb.py", line 2, in <module>
import sqlite3
File "/opt/gitlab/embedded/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/opt/gitlab/embedded/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
Any help would be greatly appreciated.

Is there any solution to error being recieved while loading jupyter-lab from cmd

UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
warnings.warn(
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\jupyterlab_server\server.py", line 20, in
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\notebook\notebookapp.py", line 51, in
from zmq.eventloop import ioloop
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\zmq_init_.py", line 50, in
from zmq import backend
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\zmq\backend_init_.py", line 40, in
reraise(*exc_info)
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\zmq\backend_init_.py", line 27, in
ns = select_backend(first)
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = import(name, fromlist=public_api)
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\zmq\backend\cython_init.py", line 6, in
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return run_code(code, main_globals, None,
File "c:\users\user\appdata\local\programs\python\python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\USER\AppData\Local\Programs\Python\Python39\Lib\site-packages\jupyter-lab.exe_main.py", line 4, in
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\jupyterlab\labapp.py", line 14, in
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\jupyterlab_server_init.py", line 4, in
from .app import LabServerApp
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\jupyterlab_server\app.py", line 9, in
from .server import ServerApp
File "c:\users\user\appdata\local\programs\python\python39\lib\site-packages\jupyterlab_server\server.py", line 29, in
from jupyter_server.extensions import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server.extensions
It feels like you have not installed some required modules e.g. jupyter_server.extensions and or setuptools. I guess you need to pip install them. Worth checking also whether you have more than one versions of python installed as this may cause issues some times.

Python exe crashes when running

I'm running a Python executable file on my PC. I created it using cx_freeze. I ran it and I am getting the following errors:
H:\>cmd /K C:\Executables\Minneapolis\build\exe.win-amd64-3.7\MinneapolisDiscovery.exe
Traceback (most recent call last):
File "C:\Python37\lib\cx_Freeze\initscripts\__startup__.py", line 40, in run
module.run()
File "C:\Python37\lib\cx_Freeze\initscripts\Console.py", line 23, in run
exec(code, {'__name__': '__main__'})
File "MinneapolisDiscovery.py", line 1, in <module>
File "C:\Python37\lib\requests\__init__.py", line 43, in <module>
import urllib3
File "C:\Python37\lib\urllib3\__init__.py", line 8, in <module>
from .connectionpool import (
File "C:\Python37\lib\urllib3\connectionpool.py", line 28, in <module>
from .packages.six.moves import queue
File "C:\Python37\lib\urllib3\packages\six.py", line 92, in __get__
result = self._resolve()
File "C:\Python37\lib\urllib3\packages\six.py", line 115, in _resolve
return _import_module(self.mod)
File "C:\Python37\lib\urllib3\packages\six.py", line 82, in _import_module
__import__(name)
ModuleNotFoundError: No module named 'queue'
It looks like something related to urllib3 or requests, but I've never gotten this error before. Any ideas on what I need to do to get this exe file to run?

Python Eclipse PyDev

I am a complete newbie to Python.
I have downloaded and installed Anaconda 3.5.2 on Windows 7, then Eclipse Photon. Installed the PyDev Plugin.
I was able to run a few simple test programs in Eclipse.
Suddenly, without installing anything I get
Error processing line 1 of C:\Anaconda3\lib\site-packages\matplotlib-2.2.2-py3.6-nspkg.pth:
Failed to import the site module
Traceback (most recent call last):
File "C:\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "C:\Anaconda3\lib\types.py", line 171, in <module>
import functools as _functools
File "C:\Anaconda3\lib\functools.py", line 21, in <module>
from collections import namedtuple
ImportError: cannot import name 'namedtuple'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Anaconda3\lib\site.py", line 541, in <module>
main()
File "C:\Anaconda3\lib\site.py", line 523, in main
known_paths = addsitepackages(known_paths)
File "C:\Anaconda3\lib\site.py", line 320, in addsitepackages
addsitedir(sitedir, known_paths)
File "C:\Anaconda3\lib\site.py", line 207, in addsitedir
addpackage(sitedir, name, known_paths)
File "C:\Anaconda3\lib\site.py", line 178, in addpackage
import traceback
File "C:\Anaconda3\lib\traceback.py", line 5, in <module>
import linecache
File "C:\Anaconda3\lib\linecache.py", line 8, in <module>
import functools
File "C:\Anaconda3\lib\functools.py", line 21, in <module>
from collections import namedtuple
ImportError: cannot import name 'namedtuple'
even with a "Hello World" which ran before
Any ideas what could cause this?
I have found the reason:
I have added a "PyDev Package" named "collections" in the IDE. This collided with something ....
You can try a few things. Have you tried updating the package in conda? It is possible it is not up to date. Also, with Eclipse (and with most IDEs) if things that were working a moment break without any changes it is a sign you should quit the program, give it a moment to settle, and try reopening and rerunning your code. Sometimes it is the tool's fault!

import ed25519._ed25519 works in powershell but not GAE

Does anyone have suggestions as to why I am getting the error below when using GAE and not with powershell? pip install comes back with requirement is already satisfied.
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "C:\Users\kunle\Documents\LAGOS_BUSINESS\ISHOPEAZYV2\iShopEazyV2WebApp\ishopeazy.py", line 21, in <module>
from stellar_base.keypair import Keypair
File "C:\Users\kunle\Documents\LAGOS_BUSINESS\ISHOPEAZYV2\iShopEazyV2WebApp\lib\stellar_base\keypair.py", line 7, in <module>
from .utils import XdrLengthError, decode_check, encode_check
File "C:\Users\kunle\Documents\LAGOS_BUSINESS\ISHOPEAZYV2\iShopEazyV2WebApp\lib\stellar_base\utils.py", line 15, in <module>
import ed25519
File "C:\Users\kunle\Documents\LAGOS_BUSINESS\ISHOPEAZYV2\iShopEazyV2WebApp\lib\ed25519\__init__.py", line 1, in <module>
from .keys import (BadSignatureError, BadPrefixError,
File "C:\Users\kunle\Documents\LAGOS_BUSINESS\ISHOPEAZYV2\iShopEazyV2WebApp\lib\ed25519\keys.py", line 3, in <module>
from . import _ed25519
File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\python\runtime\sandbox.py", line 1093, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named ed25519._ed25519
You cannot import C extension modules into a GAE application. ed25519._ed25519 is an extension module written in C.
You must find an implementation of Ed25519 that doesn't require the use of a C extension.

Categories