I'm trying to install Ansible, but I can never get a clean install for some reason. using apt-get install ansible and then doing a ansible --version I get the following output:
Traceback (most recent call last):
File "/usr/bin/ansible", line 44, in <module>
import ansible.constants as C
File "/usr/lib/python2.7/dist-packages/ansible/constants.py", line 26, in <module>
from ansible.compat.six import string_types
File "/usr/lib/python2.7/dist-packages/ansible/compat/six/__init__.py", line 40, in <module>
not hasattr(_system_six.moves, 'shlex_quote') or
AttributeError: 'module' object has no attribute 'moves'
Ansible is still very young and OS packaging is lagging behind. Although this particular error may simply be caused by a version mismatch or missing dependency.
May I suggest running Ansible from source?
Related
run rn50 scripts in NVIDIA/DeepLearningExamples, as
./rn50_partial.sh
get error like this:
Traceback (most recent call last):
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/mnasnet/training/FP32/../../../launch.py", line 7, in <module>
from main import main, add_parser_arguments, available_models
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/main.py", line 49, in <module>
from image_classification.dataloaders import *
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/image_classification/dataloaders.py", line 79, in <module>
class HybridTrainPipe(Pipeline):
NameError: name 'Pipeline' is not defined
ok, I've solved this, cause NVIDIA does not classify the specific installation, actually, it does not have to install from scratch, if you use pip install, just check which version NVIDIA docker use and download this specific version, pip install, and everything will be ok.
I am trying to see the available problems() but it is giving Error.
Can you please let me know if I am missing anything
>>> from tensor2tensor import problems
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\\Anaconda3\lib\site-packages\tensor2tensor\problems.py", line 22, in <module>
from tensor2tensor.utils import registry
File "C:\Users\\Anaconda3\lib\site-packages\tensor2tensor\utils\registry.py", line 551, in <module>
attacks = tf.contrib.framework.deprecated(None, "Use registry.attack")(attack)
AttributeError: module 'tensorflow' has no attribute 'contrib'
>>> tf.__version__
'2.0.0-beta1'
>>>
I am working on windows
Tensor2Tensor library is not yet compatible with Tensorflow 2.0 because it still uses a lot of deprecated APIs. Your only option currently is to downgrade to an older version, such as Tensorflow 1.15.
pip3 install tensorflow==1.15.0
I have a program that uses bcrypt and I would like to install the package if the user doesn't have bcrypt. It works on my PC at home running Python 3.7 and the latest version of pip but at school, it gives the error in the title. Here is the relevant code:
try:
import bcrypt
except ImportError:
from pip._internal import main as pip # if bcrypt cannot be installed, attempt installation
print("Attempting to install bcrypt...")
pip(["install","bcrypt"])
Here is the error:
Traceback (most recent call last):
File "\\ths-fs-002\Student Work\2016\16HarveyJ\NEA-1\src\main.py", line 9, in <module>
from pip._internal import main as pip # if bcrypt cannot be installed, attempt installation
File "C:\Python34\lib\site-packages\pip\__init__.py", line 9, in <module>
from pip.log import logger
File "C:\Python34\lib\site-packages\pip\log.py", line 8, in <module>
from pip import backwardcompat
File "C:\Python34\lib\site-packages\pip\backwardcompat\__init__.py", line 27, in <module>
console_encoding = sys.__stdout__.encoding
AttributeError: 'NoneType' object has no attribute 'encoding'
I Just attempted to install tensorflow for python and when I went to the console to see if the init.py was working it returned this error. I installed it manualy without pip or any other package manager.
>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\*username\AppData\Local\Programs\Python\Python35-32\lib\tensorflow\__init__.py", line 43, in <module>
_default_dlopen_flags = sys.getdlopenflags()
AttributeError: module 'sys' has no attribute 'getdlopenflags'
TensorFlow is not supported on Windows yet. Please follow this github issue which tracks TensorFlow Windows support.
I am using Python3.4. I am trying to open an application which supposedly uses Python and can't seem to get it working. I do receive the following error:
Traceback (most recent call last):
File "pychess", line 24, in <module>
gi.require_version("Gtk", "3.0")
AttributeError: 'module' object has no attribute 'require_version'
Install the dependency with pip install PyGTK, as João Cartucho suggests.