iam using fabric 0.9.1 version on windows to do some deployment related stuff.
But the moment iam about to run "fab hello" iam facing the following error
D:\pythonscripts>fab hello
Traceback (most recent call last):
File "C:\Python26\Scripts\fab-script.py", line 8, in <module>
load_entry_point('fabric==0.9.1', 'console_scripts', 'fab')()
File "build\bdist.win-amd64\egg\pkg_resources.py", line 318, in load_entry_poi
nt
File "build\bdist.win-amd64\egg\pkg_resources.py", line 2221, in load_entry_po
int
File "build\bdist.win-amd64\egg\pkg_resources.py", line 1954, in load
File "build\bdist.win-amd64\egg\fabric\main.py", line 17, in <module>
File "build\bdist.win-amd64\egg\fabric\api.py", line 9, in <module>
File "build\bdist.win-amd64\egg\fabric\context_managers.py", line 12, in <modu
le>
File "build\bdist.win-amd64\egg\fabric\state.py", line 9, in <module>
File "build\bdist.win-amd64\egg\fabric\network.py", line 19, in <module>
File "build\bdist.win-amd64\egg\fabric\utils.py", line 21, in abort
ImportError: cannot import name output
Any clue on how to resolve this error?
It seems to be this issue: http://code.fabfile.org/issues/show/194, probably it's not Fabric related but PyCrypto or Python64. If it is PyCrypto then the easiest thing is to download a binary version from http://www.voidspace.org.uk/python/modules.shtml#pycrypto and install it and download pywin32 from http://sourceforge.net/projects/pywin32/files/ and install it as well.
Related
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.
I get the following error, How to rectify this issue?
from ovirtsdk.xml import params
ImportError: No module named ovirtsdk.xml
This is the complete log file, Why I get this error and How to rectify it?
python manage.py createcachetable
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/hari/openuds/testuds-master/Python-2.7.14/env/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/home/hari/openuds/testuds-master/server/src/uds/__init__.py", line 72, in ready
from . import services # to make sure that the packages are initialized at this point
File "/home/hari/openuds/testuds-master/server/src/uds/services/__init__.py", line 73, in <module>
__init__()
File "/home/hari/openuds/testuds-master/server/src/uds/services/__init__.py", line 63, in __init__
__import__('uds.services.' + name, globals(), locals(), [])
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/__init__.py", line 31, in <module>
from .OVirtProvider import Provider
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/OVirtProvider.py", line 44, in <module>
from . import client
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/client/__init__.py", line 33, in <module>
from . import oVirtClient3;
File "/home/hari/openuds/testuds-master/server/src/uds/services/OVirt/client/oVirtClient3.py", line 7, in <module>
from ovirtsdk.xml import params
ImportError: No module named ovirtsdk.xml
You are missing the ovirt-engine-sdk-python package. Note that it requires version 3 of that package, so you can install it via pip like this:
$ pip install ovirt-engine-sdk-python==3.6.9.2
Don't run:
$ pip install ovirt-engine-sdk-python
which would install latest(4) version of the SDK, which isn't compatible with above code.
I have a ubuntu server.(10.04)
I don't install requests module. I try pip and other methods. Usually ;
$ sudo pip install requests
Traceback (most recent call last):
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py", line 3, in <module>
from ssl import CertificateError, match_hostname
ImportError: cannot import name CertificateError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py", line 7, in <module>
from backports.ssl_match_hostname import CertificateError, match_hostname
ImportError: No module named backports.ssl_match_hostname
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.5', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.1/dist-packages/distribute-0.6.49-py3.1.egg/pkg_resources.py", line 345, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.1/dist-packages/distribute-0.6.49-py3.1.egg/pkg_resources.py", line 2382, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.1/dist-packages/distribute-0.6.49-py3.1.egg/pkg_resources.py", line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/vcs/mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/download.py", line 22, in <module>
from pip._vendor import requests, six
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/utils.py", line 25, in <module>
from .compat import parse_http_list as _parse_list_header
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/compat.py", line 7, in <module>
from .packages import chardet
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/__init__.py", line 3, in <module>
from . import urllib3
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/urllib3/__init__.py", line 16, in <module>
from .connectionpool import (
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 31, in <module>
from .packages.ssl_match_hostname import CertificateError
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/urllib3/packages/__init__.py", line 3, in <module>
from . import ssl_match_hostname
File "/usr/local/lib/python3.1/dist-packages/pip-1.5.5-py3.1.egg/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py", line 10, in <module>
from _implementation import CertificateError, match_hostname
ImportError: No module named _implementation
I guess I have already setup pip 3.1. But following
$ pip -V
Then I see same problem. How to install requests module for Python 3.1 ubuntu server 10.04?
Have you tried easy_install requests?
Or you could try a non-fancy way. Google requests package, download it, unzip it and then run setup.py script like this:
python setup.py install
Have you tried pip install backports.ssl-match-hostname
Probably no harm to upgrade Python either.
I am using cx_freeze to bundle my app. I have 2 questions.
1) I am using OSX Mountain Lion - the /build/exe.macosx-10.8-x86_64-2.7 that I have - will it contain executables for Windows, Linux as well - and if so, where in the list can I find it? My original script is cpu.py. The dir contains a lot of ".so" files and 1 "cpu" file.
2) When I try "cpu" from the list above, I get this output. 'psutil' is a Python module required for the script - cpu.py.
Desktop/build/exe.macosx-10.8-x86_64-2.7/cpu ; exit;
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
exec code in m.__dict__
File "cpu.py", line 6, in <module>
File "/usr/local/lib/python2.7/site-packages/psutil/__init__.py", line 102, in <module>
import psutil._psosx as _psplatform
File "/usr/local/lib/python2.7/site-packages/psutil/_psosx.py", line 14, in <module>
import _psutil_osx
File "build/bdist.macosx-10.8-x86_64/egg/_psutil_osx.py", line 7, in <module>
File "build/bdist.macosx-10.8-x86_64/egg/_psutil_osx.py", line 4, in __bootstrap__
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 945, in resource_filename
File "build/bdist.macosx-10.8-x86_64/egg/pkg_resources.py", line 1626, in get_resource_filename
NotImplementedError: resource_filename() only supported for .egg, not .zip
logout
i got this error this morning and it's bizarre!
Traceback (most recent call last):
File "app.py", line 9, in <module>
import handlers, os
File "G:\Mon projet\sog\handlers.py", line 5, in <module>
import gridfs
File "build\bdist.win-amd64\egg\gridfs\__init__.py", line 23, in <module>
File "build\bdist.win-amd64\egg\gridfs\errors.py", line 17, in <module>
File "build\bdist.win-amd64\egg\pymongo\__init__.py", line 61, in <module>
File "build\bdist.win-amd64\egg\pymongo\connection.py", line 44, in <module>
ImportError: No module named py3compat
got the problem,
it is because i've installed bson for python so it dident found the file py3compat.py in the bson module, because it is not the pymongo's one that is seeked.
thank you and sorry again.