Trouble Installing Python3.6 Virtual Environment on Ubuntu 22.04 - virtualenv

Virtual environment stopped being created after upgrading to Ubuntu 22.04. Running the command
virtualenv venv -p python3.6
produces an error that did not occur in the previous version - Ubuntu 20.04.:
fail
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 84, in _get
result = get_wheel(
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/acquire.py", line 26, in get_wheel
wheel = from_bundle(distribution, version, for_py_version, search_dirs, app_data, do_periodic_update, env)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/bundle.py", line 13, in from_bundle
wheel = load_embed_wheel(app_data, distribution, for_py_version, of_version)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/bundle.py", line 33, in load_embed_wheel
wheel = get_embed_wheel(distribution, for_py_version)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/embed/__init__.py", line 77, in get_embed_wheel
raise Exception((
Exception: Wheel for pip for Python 3.6 is unavailable. apt install python3-pip-whl
pip-21.3.1-py3-none-any.whl already present in /home/su/.local/share/virtualenv/wheel/3.6/embed/3/pip.json
created virtual environment CPython3.6.15.final.0-64 in 3225ms
creator CPython3Posix(dest=/home/su/Downloads/courses-app/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/su/.local/share/virtualenv)
added seed packages: pip==21.3.1, setuptools==59.6.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
Can anyone help solve this problem?

The issue was resolved after installing the following packages:
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.6
sudo apt install libpython3.6-dev
sudo apt install python3.6-distutils

Related

Setting LD_LIBRARY_PATH to miniconda lib dir in docker ubuntu:20.04 breaks libp11-kit

If I run in an ubuntu:20.04 docker image (docker run -it --rm ubuntu:20.04 bash) the following commands:
apt update
apt upgrade -y
apt install -y wget
wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Linux-x86_64.sh
bash Miniconda3-py310_23.1.0-1-Linux-x86_64.sh
source /root/.bashrc
export LD_LIBRARY_PATH=/root/miniconda3/lib:$LD_LIBRARY_PATH
then it breaks libp11-kit. For instance when running apt install vim:
/usr/lib/apt/methods/http: symbol lookup error: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined symbol: ffi_type_pointer, version LIBFFI_BASE_7.0
E: Method http has died unexpectedly!
E: Sub-process http returned an error code (127)
E: Method /usr/lib/apt/methods/http did not start correctly
I tried to add other directories to LD_LIBRARY_PATH (/usr/lib/, /lib/x86_64-linux-gnu/) without result.
Possibly related to conda-build fails to recognise libraries?

Problems (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on ansible-awx's Python /bin/python3

SUMMARY:
I has done the installation ansible-awx follow the instruction:
https://howto.lintel.in/install-ansible-tower-awx-centos-7/
ISSUE TYPE :
When i ran command ansible-playbook -i inventory install.yml -vv
in folder source awx /root/awx/installer
Bug Report :
TASK [local_docker : Start the containers] ********************************************************************************************************************************
task path: /root/awx/installer/roles/local_docker/tasks/compose.yml:39
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on ansible-awx's Python /bin/python3. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for example via pip install docker or pip install docker-py (Python 2.6). The error was: No module named 'requests'"}
PLAY RECAP ****************************************************************************************************************************************************************
localhost : ok=13 changed=2 unreachable=0 failed=1 skipped=86 rescued=0 ignored=0
I try ran command with : ansible-playbook -i inventory install.yml -e 'ansible_python_interpreter=/usr/bin/python3'
But error the error appears similar above .
ANSIBLE VERSION
ansible 2.9.10
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
OS: CentOS Linux release 7.8.2003 (Core)
Thanks for helping !
I've got the same error and I solved it installing python36-docker and docker-componse.
yum install python3 python36-docker -y
pip3 install docker-compose
then rerun:
ansible-playbook -i inventory install.yml
I run into the same issue, the following command executed on managed node (host) helped:
$ pip3 install docker

Using rpm to install linux kernel and i get some Failed dependencies which is newer than the yum list ones

i am trying to upgrade kernel on centos and i use rpm to install the kernel.rpm,i got some errors
[datacenter#fonova-app-dc01 ~]$ sudo rpm -ivh kernel-
3.10.327.3.1.el7.x86_64.rpm
warning: kernel-3.10.0-327.3.1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature,
key ID 192a7d7d: NOKEY
error: Failed dependencies:
module-init-tools >= 3.16-2 is needed by kernel-3.10.0-
327.3.1.el7.x86_64
grubby >= 8.28-2 is needed by kernel-3.10.0-327.3.1.el7.x86_64
dracut >= 033-283 is needed by kernel-3.10.0-327.3.1.el7.x86_64
linux-firmware >= 20150904-43 is needed by kernel-3.10.0-
327.3.1.el7.x86_64
/usr/sbin/new-kernel-pkg is needed by kernel-3.10.0-327.3.1.el7.x86_64
[datacenter#fonova-app-dc01 ~]$ sudo yum update
Setting up Update Process
No Packages marked for Update
[datacenter#fonova-app-dc01 ~]$ sudo yum list module-init-tools
Installed Packages
module-init-tools.x86_64 3.9-26.el6 #base
[datacenter#fonova-app-dc01 ~]$
erro says that i need module-init-tools >= 3.16 but when i type
sudo yum update
sudo yum list module-init-tools
it says that hte newest version of module-init-tools is 3.9.
why will it be like this??

Google Cloud SDK gcloud error

I use Google Cloud SDK under Window 7 64bit.
Google Cloud SDK and python install success. and run gcloud.
The error occurs as shown below.
C:\Program Files\Google\Cloud SDK>gcloud
Traceback (most recent call last):
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\gcloud\gcloud.py", line 137, in <
module>
_cli = CreateCLI()
File "C:\Program Files\Google\Cloud SDK\google-cloud-sdk\bin\..\./lib\googlecloudsdk\gcloud\gcloud.py", line 98, in Cr
eateCLI
sdk_root = config.Paths().sdk_root
AttributeError: 'Paths' object has no attribute 'sdk_root'
Can ask for help? Thanks
I had the same problem. And this helped me solve this problem
Manually removed directory: C:\Program Files\Google\Cloud SDK
Then rerun: GoogleCloudSDKInstaller.exe
And make sure that you have connection to needed DL servers (I was first behind company firewall and installer didn't download all files - and no complains either by installer...)
Then I was OK again..
Source: https://code.google.com/p/google-cloud-sdk/issues/detail?id=62&thanks=62&ts=1407851956
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt update
sudo apt-get install google-cloud-sdk
gcloud init

installing mongodb with pecl

this is what i get:
bitnami#ip-10-117-57-211:/bin$ sudo pecl install mongo
downloading mongo-1.4.0.tgz ...
Starting to download mongo-1.4.0.tgz (138,495 bytes)
..............................done: 138,495 bytes
84 source files, building
WARNING: php_bin /opt/bitnami/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
Can't load '/opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /opt/bitnami/perl/lib/5.8.8/i686-linux/auto/Data/Dumper/Dumper.so: undefined symbol: PL_sv_undef at /opt/bitnami/perl/lib/5.8.8/i686-linux/XSLoader.pm line 70.
at /opt/bitnami/perl/lib/5.8.8/i686-linux/Data/Dumper.pm line 36
Compilation failed in require at /usr/share/autoconf/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at /usr/share/autoconf/Autom4te/C4che.pm line 33.
Compilation failed in require at /usr/bin/autom4te line 38.
BEGIN failed--compilation aborted at /usr/bin/autom4te line 38.
ERROR: `phpize' failed
Any ideas how to fix?
Try configuring manually as it seems bitnami is a bit funky:
$ sudo apt-get update
$ sudo apt-get install build-essential libtool autoconf unzip wget
Download the latest source code from the web page, uncompress it and compile the module.
$ wget http://pecl.php.net/get/mongo-1.4.3.tgz
$ tar -zxf mongo*
$ export PHP_AUTOCONF=/usr/bin/autoconf
$ export PHP_PREFIX=/opt/bitnami/php
$ cd mongo-*
$ /opt/bitnami/php/bin/phpize
$ ./configure
$ make
$ sudo make install
Adapted from: http://wiki.bitnami.com/Components/PHP#How_to_install_OAuth_module.3f
well i finally got it working. I ran through the steps to install mongo extension on mac server and it worked for my bitnami lamp stack.
The instructions were on this blog:
http://andres.jaimes.net/857/setup-php-mongo-on-mac/