Facing issue while installing ruamel.yaml - ruamel.yaml

When I am trying to install ruamel.yaml it is throwing the following error:
---> Running in 71801483b5a1
Collecting ruamel.yaml
Downloading ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 109.5/109.5 kB 12.3 MB/s eta 0:00:00
Collecting ruamel.yaml.clib>=0.2.6
Downloading ruamel.yaml.clib-0.2.6.tar.gz (180 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 180.7/180.7 kB 21.5 MB/s eta 0:00:00
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
[91m error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
sys.argv ['/tmp/pip-install-4z0awj5u/ruamel-yaml-clib_ebca93f6ff92409a86d7beb1a0f1b92c/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-odj056w3']
test compiling /tmp/tmp_ruamel_ua_v5oye/test_ruamel_yaml.c -> test_ruamel_yaml compile error: /tmp/tmp_ruamel_ua_v5oye/test_ruamel_yaml.c
Exception: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
[0m[91merror: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
It was working previously. I am using docker and below are the commands being used in Dockerfile
RUN pip install ruamel.yaml
RUN pip install ruamel.yaml.jinja2

You get that error because the C compiler is not installed. One thing you can do is make sure the compiler is installed so that it can compile the ruamel.yaml.clib dependency.
You are installing the ruamel.yaml wheel, and I cannot see why it is not taking the wheel for ruamel.yaml.clib. That might be caused by an architecture or Python version not being available for that architecture.
If your code is not useing YAML(typ='safe') or anything else that actually uses the C loader, then you can also do:
RUN pip install --no-deps ruamel.yaml

Related

bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory

I am trying to compile some software in Windows using MSYS2 mingw64.exe terminal.
On running the autoreconf -i command, I get the error:
-bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory
ls /usr/bin/ doesn't show perl.exe
I remember that perl was installed using some pacman -S command.
As far as I remember, this issue has come up since this month.
(I had reinstalled MSYS2 and Pacman packages thrice this month & the issue does not seem to go. Last time, I had installed all these in May this year & there were no such issues then)
I even re-installed perl in Msys2 and the following output is displayed:
$ pacman -S perl
warning: perl-5.30.3-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) perl-5.30.3-1
Total Installed Size: 50.67 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n] Y
(1/1) checking keys in keyring [####################################################################] 100%
(1/1) checking package integrity [####################################################################] 100%
(1/1) loading package files [####################################################################] 100%
(1/1) checking for file conflicts [####################################################################] 100%
(1/1) checking available disk space [####################################################################] 100%
warning: could not get file information for usr/bin/perl.exe
warning: could not get file information for usr/bin/perl5.30.3.exe
:: Processing package changes...
(1/1) reinstalling perl [####################################################################] 100%
warning: warning given when extracting /usr/bin/perl.exe (Can't create '/usr/bin/perl.exe')
warning: warning given when extracting /usr/bin/perl5.30.3.exe (Hard-link target 'usr/bin/perl.exe' does not exist.)
Still, the same issue -bash: /usr/bin/autoreconf: /usr/bin/perl: bad interpreter: No such file or directory appears
I also tried installing older version(5.28) of perl by:
pacman -S mingw-w64-i686-perl mingw-w64-x86_64-perl
Still the same issue
On further observation, I found out that the perl was getting installed in /mingw64/bin directory instead of /usr/bin.
I tried adding /mingw64/bin directory to the PATH variable as follows:
export PATH="$PATH:/mingw64/bin"
However, the issue is still the same
Please help

How to install PySide2 in a Python3 virtual environment on Raspberry Pi3

I am having a hard time installing PySide2 in a Python3 virtual enviroment on a Raspberry Pi3. I use Python-3.5.3 and the updated version of pip.
(cv3) pi#raspberrypi:~ $ which cmake
/usr/bin/cmake
(cv3) pi#raspberrypi:~ $ which qmake
/usr/bin/qmake
(cv3) pi#raspberrypi:~ $ which python
/home/pi/.virtualenvs/cv3/bin/python
(cv3) pi#raspberrypi:~ $ python --version
Python 3.5.3
(cv3) pi#raspberrypi:~ $ pip --version
pip 19.0.1 from /home/pi/.virtualenvs/cv3/lib/python3.5/site-packages/pip (python 3.5)
(cv3) pi#raspberrypi:~ $ pip3 --version
pip 19.0.1 from /home/pi/.virtualenvs/cv3/lib/python3.5/site-packages/pip (python 3.5)
First I tried to install with pip install PySide2 but I got the error
(cv3) pi#raspberrypi:~ $ pip install PySide2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting PySide2
Could not find a version that satisfies the requirement PySide2 (from versions: )
No matching distribution found for PySide2
Following the instructions found at https://wiki.qt.io/Qt_for_Python/GettingStarted on how to install via the official release wheels of Qt for Python also gives an error.
(cv3) pi#raspberrypi:~ $ pip install --index-url=https://download.qt.io/official_releases/QtForPython/ pyside2 --trusted-host download.qt.io
Looking in indexes: https://download.qt.io/official_releases/QtForPython/, https://www.piwheels.org/simple
Collecting pyside2
Could not find a version that satisfies the requirement pyside2 (from versions: )
No matching distribution found for pyside2
Then I followed the instructions on the official package site https://pypi.org/project/PySide2/. I installed the dependencies, including libclang and build from source as suggested without any errors.
git clone https://code.qt.io/pyside/pyside-setup
cd pyside-setup
git branch --track 5.12 origin/5.12
git checkout 5.12
python setup.py install --qmake=</usr/bin/qmake/> --parallel=8 --build-tests
Yet after all this work, there are no signs of the module PySide2
(cv3) pi#raspberrypi:~/pyside-setup $ python
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PySide2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PySide2'
>>>
Next thing I followed the instructions found on https://wiki.qt.io/Qt_for_Python/GettingStarted/X11. I clone the official repository, checked the versions are fine and then build using the qmake path /opt/Qt5.12/bin/qmake:
(cv3) pi#raspberrypi:~/pyside-setup $ python setup.py build --qmake=/opt/Qt5.12/bin/qmake --parallel=4 --build-tests --ignore-git
and the build gave two errors:
CMake Error at CMakeLists.txt:95 (message):
Unable to detect CLANG location by checking LLVM_INSTALL_DIR, CLANG_INSTALL_DIR or running llvm-config.
-- Configuring incomplete, errors occurred!
See also "/home/pi/pyside-setup/cv33_build/py3.5-qt5.12.0-32bit-release/shiboken2/CMakeFiles/CMakeOutput.log".
error: Error configuring shiboken2
I guessed perhaps updating CLANG and CMAKE will make a change. So I did the update to the latest version and the process went well without errors. Then I
While building PySide2 the process exits at 47% with the following error:
[ 47%] Linking CXX executable shiboken2
/home/pi/libclang/lib/libclang.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
generator/CMakeFiles/shiboken2.dir/build.make:181: set di istruzioni per l'obiettivo "generator/shiboken2" non riuscito
make[2]: *** [generator/shiboken2] Errore 1
CMakeFiles/Makefile2:2877: set di istruzioni per l'obiettivo "generator/CMakeFiles/shiboken2.dir/all" non riuscito
make[1]: *** [generator/CMakeFiles/shiboken2.dir/all] Errore 2
Makefile:140: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2
error: Error compiling shiboken2
Traceback (most recent call last):
File "setup.py", line 296, in <module>
setup_runner.run_setup()
File "/home/pi/pyside-setup/build_scripts/setup_runner.py", line 157, in run_setup
raise RuntimeError(msg)
RuntimeError:
setup.py invocation failed with exit code: 1.
setup.py invocation was: /home/pi/.virtualenvs/cv3/bin/python setup.py build --qmake=/opt/Qt5.12/bin/qmake --parallel=4 --build-tests --ignore-git --internal-build-type=shiboken2
Where is the problem?
As the version of the installed CLANG was out of date, I tried with updating it first by following the instructions found on codepool.biz. No problems arised.
Then again I pointed the LLVM and CLANG libraries to the PySide2 installation path with
export CLANG_INSTALL_DIR=/usr/local/clang_7.0.
export LLVM_INSTALL_DIR=/usr/local/clang_7.0.0
The build process successfully passed the 47% percent treeshold and finished bulding shiboken2 but got stuck at the PySide2 step at 2%. The error:
[ 2%] Built target pyside2
Makefile:140: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2
error: Error compiling pyside2
Traceback (most recent call last):
File "setup.py", line 296, in <module>
setup_runner.run_setup()
File "/home/pi/pyside-setup/build_scripts/setup_runner.py", line 157, in run_setup
raise RuntimeError(msg)
RuntimeError:
setup.py invocation failed with exit code: 1.
setup.py invocation was: /home/pi/.virtualenvs/cv3/bin/python setup.py build --qmake=/opt/Qt5.12/bin/qmake --parallel=4 --build-tests --ignore-git --internal-build-type=pyside2
What is going on?

orange add-ons error Orange3-Text 0.1.9

my orange version 3.3
i installed all add-ons but when i want to install Orange3-Text 0.1.9
(i have xcode and python-3.4.4-macosx10.6)
An error occurred while running a subprocess
Command failed: python -m pip install
Orange3-Text exited with non zero status.
Show Details
Collecting Orange3-Text
Using cached Orange3-Text-0.1.10.tar.gz
Collecting gensim>=0.12.3 (from Orange3-Text)
Using cached gensim-0.12.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting nltk (from Orange3-Text)
Using cached nltk-3.2.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): numpy in /Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from Orange3-Text)
Requirement already satisfied (use --upgrade to upgrade): scikit-learn in /Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from Orange3-Text)
Requirement already satisfied (use --upgrade to upgrade): scipy in /Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from Orange3-Text)
Collecting setuptools-git (from Orange3-Text)
Using cached setuptools-git-1.1.tar.gz
Collecting smart-open>=1.2.1 (from gensim>=0.12.3->Orange3-Text)
Using cached smart_open-1.3.2.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.0 in /Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (from gensim>=0.12.3->Orange3-Text)
Collecting boto>=2.32 (from smart-open>=1.2.1->gensim>=0.12.3->Orange3-Text)
Using cached boto-2.39.0-py2.py3-none-any.whl
Collecting httpretty==0.8.10 (from smart-open>=1.2.1->gensim>=0.12.3->Orange3-Text)
Using cached httpretty-0.8.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/private/var/folders/75/kxgr97zd7kggxsp8r0v12tph0000gn/T/pip-build-a9iyny1h/httpretty/setup.py", line 86, in <module>
version=read_version(),
File "/private/var/folders/75/kxgr97zd7kggxsp8r0v12tph0000gn/T/pip-build-a9iyny1h/httpretty/setup.py", line 46, in read_version
finder.visit(ast.parse(local_file('httpretty', '__init__.py')))
File "/private/var/folders/75/kxgr97zd7kggxsp8r0v12tph0000gn/T/pip-build-a9iyny1h/httpretty/setup.py", line 78, in <lambda>
open(os.path.join(os.path.dirname(__file__), *f)).read()
File "/Applications/Orange3.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 133: ordinal not in range(128)
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/75/kxgr97zd7kggxsp8r0v12tph0000gn/T/pip-build-a9iyny1h/httpretty
You are using pip version 7.1.2, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
We are well aware of this problem and are currently trying to resolve it with authors of smart_open (which we require through gensim - one of our dependencies). The problem occurs since gensim cannot be installed with environment variable LC_ALL=C which is how we install add-ons. Currently, I would suggest to install it through the terminal. On a Mac this can be done by going to Orange's installation folder and running the pip install:
cd /Applications/Orange3.app/Contents/MacOS
./pip install Orange3-Text
Beware that Orange3-Text is still in development and some major changes are coming through the summer. So if you encounter any issues, please report them on our issue tracker.

The compilation of coq:list-string failed at "ruby pp.rb"

I am following a coq tutorial, which requires a basic coq OPAM library coq:io:system. But I got errors with OPAM. (This is with Ubuntu14.04, coq 8.4pl6 and opam1.2.1)
I googled around and didn't find any solution.
Does anyone know what the problem might be and how to fix this error?
Thanks.
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗ installed coq:function-ninjas.1.0.0
∗ installed coq:error-handlers.1.0.0
∗ installed coq:io.3.0.0
∗ installed coq:list-plus.1.1.0
[ERROR] The compilation of coq:list-string failed at "ruby pp.rb".
∗ installed ppx_tools.0.99.2
∗ installed lwt.2.4.8
∗ installed coq:io:system:ocaml.2.2.0
#=== ERROR while installing coq:list-string.2.1.0 =============================#
# opam-version 1.2.1
# os linux
# command ruby pp.rb
# path /home/zhen/.opam/system/build/coq:list-string.2.1.0
# compiler system (4.02.1)
# exit-code 127
# env-file /home/zhen/.opam/system/build/coq:list-string.2.1.0/coq:list-string-2159-326a35.env
# stdout-file /home/zhen/.opam/system/build/coq:list-string.2.1.0/coq:list-string-2159-326a35.out
# stderr-file /home/zhen/.opam/system/build/coq:list-string.2.1.0/coq:list-string-2159-326a35.err
### stdout ###
It turns out that (as the error message suggests), this particular package seems to depend on ruby.
I was able to finish the installation after installing ruby with sudo apt-get install ruby.

Sub-process /usr/bin/dpkg returned an error code (1)

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
cordova-ubuntu-2.8-examples
Use 'apt-get autoremove' to remove it.
The following NEW packages will be installed:
mongodb-10gen
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/87.1 MB of archives.
After this operation, 221 MB of additional disk space will be used.
(Reading database ... 250020 files and directories currently installed.)
Unpacking mongodb-10gen (from .../mongodb-10gen_2.4.8_i386.deb) ...
Obsolete conffile /etc/init.d/mongodb has been modified by you, renaming to .dpkg-bak
dpkg: error processing /var/cache/apt/archives/mongodb-10gen_2.4.8_i386.deb (--unpack):
trying to overwrite '/usr/bin/mongos', which is also in package mongodb-10gen-unstable-mongos 2.5.2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-10gen_2.4.8_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
please see here! worked for me:
install mongodb-10gen failed with apt-get
A bug here https://jira.mongodb.org/browse/SERVER-6910
apt-get remove mongodb-clients
and then the installation of mongodb-10gen should work.