pip install fails with failed to parse error - python-3.x

ERROR: Could not install packages due to an EnvironmentError: Failed to parse:
I am using below command for installation
python3.7 -m pip install --user xxx-scanner
I tried this command on ubuntu vm.This command works in my vm but fails from travis setup
ubuntu dist: xenial

As mentioned in the link provided by #ambikanair if you get an error like:
ERROR: Could not install packages due to an EnvironmentError: Failed to parse:
you likely need to escape characters like # or % in the URL in your pip configuration file (e.g. ~/.pip/pip.conf), so instead of:
user#domain.com
do:
user%40domain.com
This is a requirement since pip 19.2, caused by urrlib3 library introducing changes to URL parsing (see issue on GitHub).

I found the reason for the issue
https://github.com/pypa/pip/issues/6775

Related

Fluentd installation - Centos

I am trying to install Fluentd software on Centos servers and I get the error below:
Building native extensions. This could take a while...
ERROR: Error installing fluentd:
ERROR: Failed to build gem native extension.
current directory: /opt/rh/rh-ruby26/root/usr/local/share/gems/gems/msgpack-1.6.0/ext/msgpack
/opt/rh/rh-ruby26/root/usr/bin/ruby -I /opt/rh/rh-ruby26/root/usr/share/rubygems -r ./siteconf20221204-2069-z0rswh.rb extconf.rb
mkmf.rb can't find header files for ruby at /opt/rh/rh-ruby26/root/usr/share/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
I saw in previous guides that I need to complete these commands:
xcode-select --install
sudo xcodebuild -license
However, when I tried to run the command I get this error:\
bash: xcode-select: command not found
Someone can assist please?
Thanks!!!
Install Fluentd on centos server
I get this error when I've run "sudo yum install ruby-devel"

How can I get rid of a nova conflicting dependencies error as I install openstack?

I've been trying to install OpenStack using devstack tools on ubuntu 18.04 and I'm stuck with this error: Cannot install nova because these package versions have conflicting dependencies.
It's shown like this :
*INFO: pip is looking at multiple versions of nova to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install nova because these package versions have conflicting dependencies.
The conflict is caused by:
pypowervm 1.1.27 depends on futures>=3.0; python_version == "3.6"
The user requested (constraint) futures===3.0.5
To fix this you could try to:
loosen the range of package versions you've specified
remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies *
Solved:
This is a common error because in Python 3.x, you cannot install futures==3.0.5 and pypowervm==1.1.27 requires futures>=3.0. Even if you plan to downgrade your python version to 2.x, Openstack requires a minimum version of Python>=3.6 to execute and hence it's sort of a deadlock. My answer is a workaround for this deadlock and I plan to create a PR to the repo to resolve it.
The following steps helped me to solve it :
Step 1: Download the Package
wget https://files.pythonhosted.org/packages/55/db/97c1ca37edab586a1ae03d6892b6633d8eaa23b23ac40c7e5bbc55423c78/futures-3.0.5.tar.gz#sha256=0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df
Step 2: Extract the Package
tar xfvz futures-3.0.5.tar.gz
cd futures-3.0.5/
Step 3: Ignore the exception
sed -i "s/raise type(self._exception), self._exception, self._traceback/raise Exeption(type(self._exception), self._exception, self._traceback)/" concurrent/futures/_base.py
Step 4: All done now, last step to install
sudo python3 setup.py install
I confirmed that this worked for me and many others and please find the source and original link to a whole blogpost of possible Openstack errors you can face during installations.
https://developpaper.com/using-devstack-to-install-openstack-with-one-click-the-detailed-process-and-the-pits-encountered/

NVM can not install nodejs on ubuntu 18.04

I Tried to install nodejs using nvm on ubuntu 18.04. But everytime it's throwing following error stack
pasindu#pasindu-HP-EliteBook-850-G7-Notebook-PC:~$ nvm install 0.10.35
Downloading and installing node v0.10.35...
Downloading https://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz...
Warning: Failed to create the file
Warning: /home/pasindu/.nvm/.cache/bin/node-v0.10.35-linux-x64/node-v0.10.35-li
Warning: nux-x64.tar.gz: Permission denied
curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v0.10.35/node-v0.10.35-linux-x64.tar.gz failed, trying source.
grep: /home/pasindu/.nvm/.cache/bin/node-v0.10.35-linux-x64/node-v0.10.35-linux-x64.tar.gz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Detected that you have 12 CPU core(s)
Running with 11 threads to speed up the build
Downloading https://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz...
Warning: Failed to create the file
Warning: /home/pasindu/.nvm/.cache/src/node-v0.10.35/node-v0.10.35.tar.gz:
Warning: Permission denied
curl: (23) Failure writing output to destination
Binary download from https://nodejs.org/dist/v0.10.35/node-v0.10.35.tar.gz failed, trying source.
grep: /home/pasindu/.nvm/.cache/src/node-v0.10.35/node-v0.10.35.tar.gz: No such file or directory
Provided file to checksum does not exist.
It may be the problem of snap curl, see here, cos I installed curl with snap at first and always encounter this problem, then I removed curl with sudo snap remove curl and reinstall it with sudo apt install curl, my current curl version is 7.68.0. then solved it.
I had to clear the cache:
nvm cache clear.
I've got the error after I tried to install a version of Node, which I've tried to install already, however the installation processs failed at the first time due disconnecting from the internet.

package python to be installed to custom location

My objective is to build a python rpm that can install to custom location on rhel 6 box.
I have take source from https://dl.iuscommunity.org/pub/ius/stable/Redhat/6/SRPMS/python34u-3.4.3-2.ius.el6.src.rpm
rpmbuild with prefix of /tmp/python/new_install succeeded in packaging.
When I try to install rpm, I am encountering circular dependency.
Install of ABCpython34u-3.4.3-2.ius.el6.x86_64.rpm gives
error: Failed dependencies:
ABCpython34u-libs(x86-64) = 3.4.3-2.ius.el6 is needed by ABCpython34u-3.4.3-2.ius.el6.x86_64
libpython3.4m.so.1.0()(64bit) is needed by ABCpython34u-3.4.3-2.ius.el6.x86_64
Install of ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm gives
error: Failed dependencies:
/tmp/python/new_install/bin/python3.4 is needed by ABCpython34u-libs-3.4.3-2.ius.el6.x86_64
Any guidance is much appreciated.
Update:
/bin/rpm -i --noscripts -v ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm ABCpython34u-3.4.3-2.ius.el6.x86_64.rpm 2>&1
error: Failed dependencies:
libpython3.4m.so.1.0()(64bit) is needed by ABCpython34u-3.4.3-2.ius.el6.x86_64
$ rpm -q --provides -p ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm|grep libpython3.4m.so.1.0
libpython3.4m.so.1.0()(64bit)(ABC)
You just need to install them together:
yum install ./ABCpython34u-3.4.3-2.ius.el6.x86_64.rpm ./ABCpython34u-libs-3.4.3-2.ius.el6.x86_64.rpm
But what you are doing (python in custom location) is very likely wrong. If you want to have recent python on RHEL6 box you very likely want Software Collection:
https://www.softwarecollections.org/en/
https://www.softwarecollections.org/en/scls/rhscl/rh-python34/

RPM Installation dependency error

I am attempting to install StackStorm on a RHEL6 environment since I was encountering issues with their deployment script. I believe I got all the required software installed but have been encountering issues trying to install the actual StackStorm packages. All my commands are run with the sudo prefix as the root user.
Ex command:
sudo rpm -i st2common-0.11.0-6.noarch.rpm
Output:
error: Failed dependencies:
python(abi) = 2.7 is needed by st2common-0.11.0-6.noarch
Here is the resource I am using:
http://docs.stackstorm.com/install/rpm.html
How can I resolve this dependency error and update python?
Thanks!
You can do it using yum.
yum localinstall st2common-0.11.0-6.noarch.rpm

Resources