I install openstack (liberty) on my server, after I installed the openstack client package, but, I meet such error when I execute openstack:
[root#node0 tools]# openstack
Traceback (most recent call last):
File "/usr/bin/openstack", line 6, in <module>
from openstackclient.shell import main
File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 24, in <module>
from cliff import app
File "/usr/lib/python2.7/site-packages/cliff/app.py", line 14, in <module>
from .complete import CompleteCommand
File "/usr/lib/python2.7/site-packages/cliff/complete.py", line 10, in <module>
from cliff import command
File "/usr/lib/python2.7/site-packages/cliff/command.py", line 9, in <module>
#six.add_metaclass(abc.ABCMeta)
AttributeError: 'module' object has no attribute 'add_metaclass'
what is the problem happend? My OS is centos7, what I did when I install python-openstackclient like this:
[root#node0 tools]# yum install python-openstackclient
List item
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.btte.net
* epel: ftp.riken.jp
* extras: mirrors.yun-idc.com
* updates: mirrors.btte.net
Resolving Dependencies
--> Running transaction check
---> Package python-openstackclient.noarch 0:1.7.1-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================
Installing:
python-openstackclient noarch 1.7.1-1.el7 centos-openstack-liberty 431 k
Transaction Summary
=============================================================================================================================================
Install 1 Package
Total download size: 431 k
Installed size: 2.6 M
Is this ok [y/d/N]: y
Downloading packages:
python-openstackclient- 1.7.1-1.el7.noarch.rpm | 431 kB 00:00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : python-openstackclient- 1.7.1-1.el7.noarch 1/1
Verifying : python-openstackclient- 1.7.1-1.el7.noarch 1/1
Installed:
python-openstackclient.noarch 0:1.7.1-1.el7
Complete!
please help me to check what happened! any suggestion is welcomed, thanks!
Try to upgrade six module:
pip install --upgrade six
or re-installing it:
pip uninstall six
pip install six
based on the suggestion here.
Related
I am getting the below error when running "pre-commit run --all-files" and when trying to make a commit, it is some python error, python version in use is "Python 2.7.16".
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/Users/user/.cache/pre-commit/repoq_mv31g8/py_env-default/bin/python', '-mpip', 'install', '.', 'tokenize-rt==3.2.0', 'pydantic')
return code: 1
expected return code: 0
stdout:
Processing /Users/user/.cache/pre-commit/repoq_mv31g8
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting tokenize-rt==3.2.0
Using cached tokenize_rt-3.2.0-py2.py3-none-any.whl (6.1 kB)
Collecting pydantic
Using cached pydantic-1.9.0-cp310-cp310-macosx_11_0_arm64.whl (2.4 MB)
Collecting mypy==0.782
Using cached mypy-0.782-py3-none-any.whl (2.4 MB)
Collecting mypy-extensions<0.5.0,>=0.4.3
Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting typing-extensions>=3.7.4
Using cached typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting typed-ast<1.5.0,>=1.4.0
Using cached typed_ast-1.4.3.tar.gz (210 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: pre-commit-dummy-package, typed-ast
Building wheel for pre-commit-dummy-package (setup.py): started
Building wheel for pre-commit-dummy-package (setup.py): finished with status 'done'
Created wheel for pre-commit-dummy-package: filename=pre_commit_dummy_package-0.0.0-py3-none-any.whl size=1154 sha256=ea7d756fd19dee0f5f03851e3e343db4194f4b306f21fecb796b4d6d89d266fb
Stored in directory: /private/var/folders/v4/nlc505k12rn9pf4c9kntz8qm0000gn/T/pip-ephem-wheel-cache-4jcph5rz/wheels/80/78/0d/746d1697141e342b257e21c980fc51ac134e6b6400568c3646
Building wheel for typed-ast (setup.py): started
Building wheel for typed-ast (setup.py): finished with status 'error'
Running setup.py clean for typed-ast
Successfully built pre-commit-dummy-package
Failed to build typed-ast
Installing collected packages: typed-ast, mypy-extensions, typing-extensions, tokenize-rt, pydantic, mypy, pre-commit-dummy-package
Running setup.py install for typed-ast: started
Running setup.py install for typed-ast: finished with status 'error'
stderr:
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
running bdist_wheel
running build
running build_py
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
running build_ext
building '_ast27' extension
building '_ast3' extension
ast3/Python/ast.c:844:5: warning: code will never be executed [-Wunreachable-code]
abort();
^~~~~
ast3/Python/ast.c:4514:9: error: implicit declaration of function '_PyUnicode_DecodeUnicodeEscape' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
^
ast3/Python/ast.c:4514:9: note: did you mean 'PyUnicode_DecodeUnicodeEscape'?
/opt/homebrew/opt/python#3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10/unicodeobject.h:608:23: note: 'PyUnicode_DecodeUnicodeEscape' declared here
PyAPI_FUNC(PyObject*) PyUnicode_DecodeUnicodeEscape(
^
ast3/Python/ast.c:4514:7: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for typed-ast
error: subprocess-exited-with-error
× Running setup.py install for typed-ast did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
running install
/Users/user/.cache/pre-commit/repoq_mv31g8/py_env-default/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
running build_ext
building '_ast27' extension
building '_ast3' extension
ast3/Python/ast.c:844:5: warning: code will never be executed [-Wunreachable-code]
abort();
^~~~~
ast3/Python/ast.c:4514:9: error: implicit declaration of function '_PyUnicode_DecodeUnicodeEscape' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
^
ast3/Python/ast.c:4514:9: note: did you mean 'PyUnicode_DecodeUnicodeEscape'?
/opt/homebrew/opt/python#3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10/unicodeobject.h:608:23: note: 'PyUnicode_DecodeUnicodeEscape' declared here
PyAPI_FUNC(PyObject*) PyUnicode_DecodeUnicodeEscape(
^
ast3/Python/ast.c:4514:7: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> typed-ast
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Check the log at /Users/user/.cache/pre-commit/pre-commit.log
I am running it on Apple M1 Air (macOS Big Sur), what am I missing or is it a known M1 issue ?
I have tried installing pydantic manually, pre-commit is installed by brew.
Thanks in Advance
pre-commit config:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
hooks:
- id: mypy
additional_dependencies: [pydantic]
you're installing a very old version of mypy (0.782) which depends on an old version of typed-ast (<1.5.0) which does not support M1
you can ~usually get to the latest version by running pre-commit autoupdate -- or pick a version newer than 0.900 (where mypy started support for M1)
disclaimer: I created pre-commit
I am using Ubuntu 22.04.
In short, when I try git commit, it will report an error because I have installed pre-commit:
An unexpected error has occurred: CalledProcessError: command: ('python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
Executable `python` not found
First, we usually have python3 installed, so the python command is invalid.
Do it:
sudo apt install python-is-python3
Then, you usually encounter this problem in Ubuntu 22.04:
An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy immediately after install, please open an issue describing your environment
more info:
virtualenv python version did not match created version:
- actual version: <<error retrieving version from /home/wind/.cache/pre-commit/reposyb8net0/py_env-python3/bin/python>>
- expected version: 3.10.4.final.0
To fix this, add this line to your .bashrc file:
export SETUPTOOLS_USE_DISTUTILS=stdlib
Refresh the configuration file by restarting a terminal window or running source ~/.bashrc.
So here is the error i am getting from the console. I understand that hydromad package is not on cran but I have added it as secondary repos in packages(Tools options in R studio) and in .R profile file. Still I am getting this error
****Preparing to deploy application...DONE
Uploading bundle for application: 2120925...DONE
Deploying bundle: 3058356 for application: 2120925 ...
Waiting for task: 720810692
building: Parsing manifest
building: Building image: 3408182
building: Installing system dependencies
building: Fetching packages
error: Building package: hydromad
########################## Begin Task Log ################################
[2020-04-24T06:51:09.225825780+0000] Execute script: packages/build/sys.sh
+ set -e
+ apt-get update -qq
+ apt-get install -y libapparmor-dev
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
libapparmor-dev
0 upgraded, 1 newly installed, 0 to remove and 114 not upgraded.
Need to get 67.8 kB of archives.
After this operation, 229 kB of additional disk space will be used.
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapparmor-dev amd64 2.10.95-0ubuntu2.11 [67.8 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 67.8 kB in 0s (0 B/s)
Selecting previously unselected package libapparmor-dev:amd64.
(Reading database ... 119718 files and directories currently installed.)
Preparing to unpack .../libapparmor-dev_2.10.95-0ubuntu2.11_amd64.deb ...
Unpacking libapparmor-dev:amd64 (2.10.95-0ubuntu2.11) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libapparmor-dev:amd64 (2.10.95-0ubuntu2.11) ...
########################### End Task Log #################################
Error: Unhandled Exception: Child Task 720810693 failed: Error building image: Error fetching hydromad (0.9-26) source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package: hydromad (0.9-26)
In addition: Warning message:
In FUN(X[[i]], ...) :
Package 'hydromad 0.9-26' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
Execution halted****
Can anyone help me resolve this error? Will be grateful
Welcome to StackOverflow! Your question is quite specific, so I would recommend to use a more specialized resource. The good news is that package hydromad has its own forum
Ubuntu 18.04
Rstudio 3.4.4
Tensorflow 1.11.0
When I run install_keras(tensorflow="gpu")
all was good with the last few lines being:
tensorflow-gpu 1.11.0 has requirement setuptools<=39.1.0, but you'll have setuptools 40.4.3 which is incompatible.
Installing collected packages: keras, tensorflow-hub
Successfully installed keras-2.2.4 tensorflow-hub-0.1.1
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Installation complete.
Restarting R session...
I don't think the issues are related to what's coming next.
I loaded the IMDB dataset: > imdb <- dataset_imdb(num_words = 10000)
And these errors popped up:
Error: ImportError: Traceback (most recent call last):
File "/home/chubuntu/anaconda3/envs/r-tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/chubuntu/anaconda3/envs/r-tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/chubuntu/anaconda3/envs/r-tensorflow/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/chubuntu/anaconda3/envs/r-tensorflow/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/chubuntu/anaconda3/envs/r-tensorflow/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas
I can load those dataset in keras with tensorflow without GPU. So what could be wrong here?
I have installed the package cx_Oracle, using conda skeleton command on my Windows 64bits machine, within Anaconda python
conda skeleton pypi cx_Oracle
af5f7daad67d6820670d582dfc045/cx_Oracle-6.0rc1.tar.gz (200 KB) for cx_Oracle.
Downloading cx_Oracle
Using cached download
Unpacking cx_Oracle...
done
when I am checking the file/ directory is finally set, I see it there
File "C:\Anaconda3_version4.3\lib\site-packages\conda_build\skeletons\pypi.py", line 339, in skeletonize
raise RuntimeError("directory already exists: %s" % dir_path)
RuntimeError: directory already exists: .\cx_oracle
but when I am calling it, it cannot be found
import cx_oracle
Traceback (most recent call last):
File "<ipython-input-3-fa7af752f8a0>", line 1, in <module>
import cx_oracle
ModuleNotFoundError: No module named 'cx_oracle'
The directory of cx_Oracle contains the files,
and know I need to build the package with conda build:
conda build cx_Oracle
Just so, it still doesn't work
Provides me the following error:
Anaconda3_version4.3\conda-bld\cx_oracle_1499164
353203\_b_env\Library\include /Tcsrc/cx_Oracle.c /Fobuild\temp.win-amd64-3.6\Rel
ease\src/cx_Oracle.obj -DBUILD_VERSION=6.0rc1
error: command 'cl.exe' failed: No such file or directory
I do not understand what else is needed to finally install the package
Thanks for reading.
Finally, I got a hint about this error thanks to the comments from #darthbith,
Building cx_Oracle requires you to have working C(++) compiler since cx_Oracle is written in C, not in Python even it's a Python module.
I've downloaded cloudera-manager-installer.bin from CDH's official site. But when I trying to install it, the program hangs at 40% progress.
The installation log looks like this:
Loading mirror speeds from cached hostfile
* epel: mirrors.neusoft.edu.cn
* rpmforge: ftp.riken.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package cloudera-manager-server.x86_64 0:4.8.2-1.cm482.p0.101.el6 will be installed
--> Processing Dependency: cloudera-manager-daemons = 4.8.2 for package: cloudera-manager-server-4.8.2-1.cm482.p0.101.el6.x86_64
--> Running transaction check
---> Package cloudera-manager-daemons.x86_64 0:4.8.2-1.cm482.p0.101.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
cloudera-manager-server x86_64 4.8.2-1.cm482.p0.101.el6 cloudera-manager 7.7 k
Installing for dependencies:
cloudera-manager-daemons
x86_64 4.8.2-1.cm482.p0.101.el6 cloudera-manager 148 M
Transaction Summary
================================================================================
Install 2 Package(s)
Total download size: 148 M
Installed size: 203 M
Downloading Packages:
I can access archive.cloudera.com from my server.
How can I deal with this problem ?
Try the following
sudo unmount cm_processes
sudo rm -Rf /var/run/cloudera*
Doing it solved this for me.