How to download yum packages on windows or from some website? - python

When creating virtual env via python3.7 -m venv myenv I get following error:
Error: Command '[/home/..../python3', '-lm', 'ensurepip', '--upgrade', '--deault-pip'] returned non-zero exit status 1
This seems to be solved my installing 3 python packages via:
apt-get/yum install python3.7 python3-venv python3.7-venv according to pyvenv-3.4 returned non-zero exit status 1
However My linux server (RHEL 8.4) does not have internet connection therefore I need to download 3 packages mentioned above and then transfer it to the server.
Where can I install them?
I know I could spin up same os version then download files (last resort)
I'm aware of websites pkgs.org/, rpmfind.net : I cannot find all 3 packages.

Related

pip install requierements.txt in azure app service

I want to launch a web app on Azure app sevice connected to my azure repo, but I have this problem
ERROR: Command errored out with exit status 1: /tmp/8da0e58792c9438/antenv/bin/python /tmp/8da0e58792c9438/antenv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp34ji_cp4 Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 22.0.4 is available.
You should consider upgrading via the '/tmp/8da0e58792c9438/antenv/bin/python -m pip install --upgrade pip' command.
"2022-03-25 07:00:00"|ERROR|Failed pip installation with exit code: 1
ERROR: Command errored out with exit status 1:\n command: /tmp/8da0e58792c9438/antenv/bin/python /tmp/8da0e58792c9438/antenv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp34ji_cp4\n cwd: /tmp/pip-install-t7g41qou/pywinpty\n
Complete output (6 lines):\n \n Cargo, the Rust package manager, is not installed or is not on PATH.\n This package requires Rust and Cargo to compile extensions. Install it through\n the system's package manager or via https://rustup.rs/\n \n Checking for Rust toolchain....
\n ----------------------------------------\n
ERROR: Command errored out with exit status 1: /tmp/8da0e58792c9438/antenv/bin/python /tmp/8da0e58792c9438/antenv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp34ji_cp4 Check the logs for full command output.\nWARNING: You are using pip version 20.1.1; however, version 22.0.4 is available.\nYou should consider upgrading via the '/tmp/8da0e58792c9438/antenv/bin/python -m pip install --upgrade pip' command.\n/opt/Kudu/Scripts/starter.sh oryx build /home/site/repository -o /home/site/wwwroot --platform python --platform-version 3.7 -i /tmp/8da0e58792c9438 --compress-destination-dir -p virtualenv_name=antenv --log-file /tmp/build-debug.log
can anyone help me with this ?
I tried to add pip version in my requierments.txt but it doesn't help at all
I have removed the specific packages for windows and the compilation works.
As my current app service plan is on linux, the windows packages pyw32 could not work. so just by removing it from de requierement file the compliation works and my app is launched.

I can't install pip

I'm trying to download pip.
However, whenever I try the error I get is:
'pip' is not recognized as an internal or external command,
operable program or batch file.
Another thing is that, when I use the command python get-pip.py I just get an enter and nothing happens. I have attached an image:
It means pip is not yet available on your computer. To install pip on a debian linux distribution check the python version and use the following commands. For python2 if that is what is available on your computer.
sudo apt-get install pip
for python3 use
sudo apt-get install pip3
If you are on a windows os you will have to go a different fairly longer route.
first you will need to install chocolatey on your device so refer to the links and install as they have highlighted in the instructions. After installing chocolatey open up your command prompt and run
choco install pip
With that you should have pip installed on your device and ready for use

libsasl dependency issues when installing librdkafka1 via yum on aws linux machine

I'm trying to install the python confluent-kafka package using pip. I'm attempting this on an aws ec2 instance that is running amazon linux (version Amazon Linux AMI release 2016.09). I'm simply doing:
pip install pip install confluent-kafka
This however produces the following error:
In file included from confluent_kafka/src/confluent_kafka.c:17:0:
confluent_kafka/src/confluent_kafka.h:21:32: fatal error: librdkafka/rdkafka.h: No such file or directory
#include <librdkafka/rdkafka.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
To resolve this, I did two things:
1) Followed the instructions on this page and added the file /etc/yum.repos.d/confluent.repo with the contents:
[Confluent.dist]
name=Confluent repository (dist)
baseurl=http://packages.confluent.io/rpm/3.0/6
gpgcheck=1
gpgkey=http://packages.confluent.io/rpm/3.0/archive.key
enabled=1
[Confluent]
name=Confluent repository
baseurl=http://packages.confluent.io/rpm/3.0
gpgcheck=1
gpgkey=http://packages.confluent.io/rpm/3.0/archive.key
enabled=1
2) attempted to install the librdkafka library using this command:
sudo yum clean all
sudo yum install -y librdkafka1 librdkafka-devel
Yum spits out this error however:
Error: Package: librdkafka1-0.9.1_confluent3.0.1-1.el7.x86_64 (Confluent.dist)
Requires: openssl-libs
Error: Package: librdkafka1-0.9.1_confluent3.0.1-1.el7.x86_64 (Confluent.dist)
Requires: libsasl2.so.3()(64bit)
After some googling, I tried:
sudo ln /usr/lib64/libsasl2.so.2 /usr/lib64/libsasl2.so.3
This had no effect. I tried doing a yum upgrade and this also did not solve the issue. After much googling, this kafka user group post is the only remotely helpful thing I can find, but it sadly does not contain a solution to the problem.
I'd really like to get kafka python up and running on this instance, so any suggestions would be greatly appreciated.
Amazon Linux 2016.19 seems to be based on RHEL 6 so you will need to reference Confluent's RHEL 6 Yum repo as described in Confluent docs, namely by writing the following to /etc/yum.repos.d/confluent:
[Confluent.dist]
name=Confluent repository (dist)
baseurl=http://packages.confluent.io/rpm/3.1/6
gpgcheck=1
gpgkey=http://packages.confluent.io/rpm/3.1/archive.key
enabled=1
[Confluent]
name=Confluent repository
baseurl=http://packages.confluent.io/rpm/3.1
gpgcheck=1
gpgkey=http://packages.confluent.io/rpm/3.1/archive.key
enabled=1
Followed by:
$ sudo yum clean all
$ sudo yum install gcc librdkafka1 librdkafka-devel cyrus-sasl-devel openssl-libs python-devel
$ pip install confluent-kafka (possibly in a virtualenv)

How can I install PyTango 7.2 in a virtualenv on Debian 7?

I am able to install PyTango 7.2 on Debian 7 using:
sudo apt-get install python-pytango #installs on system, not virtualenv
However, I need to install it in a Python virtualenv. I have created a virtualenv and installed the following prerequisites, but it still doesn't compile:
sudo apt-get install python-pytango #so this anyway to install some prerequisites
sudo apt-get install libboost-python-dev #additional prerequisite for compilation
workon virtualenvname
easy_install PyTango-7.2.4.tar.gz
I get:
Processing PyTango-7.2.4.tar.gz
Running PyTango-7.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZhyGFF/PyTango-7.2.4/egg-dist-tmp-psCoDv
/tmp/easy_install-ZhyGFF/PyTango-7.2.4/src/api_util.cpp:25:19: fatal error: tango.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
I'm guessing that I can apt-get install an additional Tango package or two to make tango.h available, but which one? Or is there another way?
You need to install the libtango7-dev package to get the header files.
You can search the contents of Debian packages here https://www.debian.org/distrib/packages#search_contents

Error when installing lxml on MacOSX 10.7.5:

I am running into many problems when trying to install lxml on MacOSX 10.7.5 with Homebrew and pip. I have Xcode 4.6.3 with the Command-line tools installed. Here are my exact steps:
$ export CC=llvm-gcc-4.2
$ export CXX=llvm-g++-4.2
$ brew install --use--llvm libxml2
$ brew install --use-llvm libxslt
$ sudo pip install lxml
The brew installs finish successfully, but the pip install gives me the following error:
error: command 'cc' failed with exit status 1
Full log is here: https://gist.github.com/sloria/5902993
When I try to use easy_install:
$ sudo easy_install lxml
I get a different error:
error: Setup script exited with error: command 'cc' failed with exit status 1
Full log here: https://gist.github.com/sloria/5903014
What is going on here?
Try using the system clang compiler (no --use-llvm flag) and do a brew doctor because you should not need to use sudo with pip. There might be a problem with the access rights so that libxml/xmlversion.h might not be readable.
Did you install python/pip with brew? Mixing brew and not-brew installed applications is sometimes a problem.
I tried it on my system (Mac OSX 10.8.4 and Xcode 4.6.3) with:
brew install libxml2
brew install libxslt
pip install lxml
and everything is fine.
Found my solution: the config scripts from Postgres.app was confusing Homebrew.
It was just a matter of removing Applications/Postgres.app/Contents/MacOS/bin/ from my path.
I then added an alias for the psql script: alias psql="Applications/Postgres.app/Contents/MacOS/bin/psql"
More info from brew doctor:
"config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:

Categories

Resources