Not able to install requirement s.txt file in my conda environment - installation

I am trying to install a requirements.txt file to my conda environment, in Windows. Following are the steps followed:
Open Anaconda Prompt
conda activate new_env
Executing following command install requirments.txt files
conda install --file requirements.txt
This is the result I am getting.
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- torchsummary==1.5.1
- prometheus-client
- opencv-python==4.5.4.58
- gviz-api==1.10.0
- jupyterlab-widgets==1.0.2
- psutil==5.9.2
- pycrs==1.0.2
- pyrsistent==0.18.1
- jupyterlab-pygments
- pytweening==1.0.4
- qudida==0.0.4
- pyscreeze==0.1.28
- smmap==5.0.0
- pygetwindow==0.0.9
- setproctitle==1.3.2
- torchvision==0.11.2
- opt-einsum==3.3.0
- fastjsonschema
- mahotas==1.4.12
- imageio==2.15.0
- cachetools==4.2.4
- tensorflow-gpu==2.7.0
- tensorflow-estimator==2.7.0
- tifffile==2021.11.2
- pyrect==0.1.4
- thop==0.1.1.post2209072238
- tensorboard-plugin-profile==2.8.0
- sentry-sdk==1.9.10
- ipython-genutils
- prompt-toolkit==3.0.27
- fonttools==4.28.5
- ctypes-callable==1.0.4
- importlib-resources==5.4.0
- tensorboard-data-server==0.6.1
- jupyter-console==6.4.0
- torch==1.10.1
- gitdb==4.0.9
- opencv-python-headless==4.5.5.62
- pywavelets==1.2.0
- pyproj==3.2.1
- win-inet-pton
- mouseinfo==0.1.3
- rsa==4.8
- keras==2.7.0
- pymsgbox==1.0.9
- pyperclip==1.8.2
- absl-py==1.0.0
- tensorflow-io-gcs-filesystem==0.23.1
- charset-normalizer==2.0.10
- threadpoolctl==3.1.0
- albumentations==1.1.0
- geojson
- gitpython==3.1.29
- markdown==3.3.6
- mkl-random
- mkl-fft==1.3.1
- tensorflow==2.7.0
- pkgutil_resolve_name
- scikit-image==0.19.1
- pyautogui==0.9.53
- bidict==0.21.4
- grpcio==1.43.0
- shortuuid==1.0.9
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
What can be the issue?
Note: The folder path is set to the location where the 'requirements.txt' file is residing.
I have implemented it in Anconda, version 2022.05 on Windows 10.

Related

Bitbuckets Pipelines create a step with parallel steps

I want to have one step, that will setup everything and then in parallel run other steps. Currently I have something like this:
image: python:3.9.16-alpine
pipelines:
default:
- step:
runs-on:
- self.hosted
- regressiontests
name: First Step
clone:
enabled: false
caches:
- pip
script:
- apk add git
- apk add openssh-client
- git clone myrepository.git
- pip install -r myrepository/requirements.txt
- echo $ENV_FILE | base64 -d -i > myrepository/.env
artifacts:
- myrepository/**
- step:
runs-on:
- self.hosted
- regressiontests
name: Second Step
clone:
enabled: false
caches:
- pip
script:
- cd myrepository
- pip install -r requirements.txt
parallel:
- step:
name: Step 2.1
script:
- python fancy command 1
- step:
name: Step 2.2
script:
- python fancy command 2
- step:
name: Step 2.3
script:
- python fancy command 3
- step:
name: Step 2.4
script:
- python fancy command 4
But the only steps that I see is First Step and Second Step none of parallel steps is executed in pipelines
That's not the correct syntax for parallel steps. Checkout https://support.atlassian.com/bitbucket-cloud/docs/set-up-or-run-parallel-steps/
image: python:3.9.16-alpine
pipelines:
default:
- step:
name: First Step
script: []
- step:
name: Second Step
script: []
- parallel:
- step:
name: Step 3.1
script: []
- step:
name: Step 3.2
script: []
# ...
This what I think you are trying to achieve
BUT
Each step script happens in a new pristine docker container, so any setup must happen in the same script where the software will be used.
Therefore I am afraid your whole effort to speed up your steps setup is futile.
Instead, you'd like to tune your caches. For python you may want to cache both ~/.cache/pip and a virtualenv so that pip install -r ... instructions are sped up.
Plus, I have a feeling that bitbucket artifacts are quite slow so I'd expect disabling the repository clone in every step to be actually slower. I'd use a shallow clone instead with
clone:
depth: 1

SSL certificate installation using letsencrypt in XAMPP server

I'm using command:
sudo certbot --apache-ctl /opt/lampp/bin/apachectl
to install the certificate in XAMPP server. However the certificate is installing in the /etc/apache2 location.
How can I repoint to the XAMPP Apache server? The logs is below:
ubuntu#ip-172-31-33-70:~$ sudo certbot --apache-ctl /opt/lampp/bin/apachectl
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter 'c' to cancel): ploshop.co.in
Cert not yet due for renewal
You have an existing certificate that has exactly the same domains or certificate name you requested and isn't close to expiry.
(ref: /etc/letsencrypt/renewal/ploshop.co.in.conf)
What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Renewing an existing certificate
Created an SSL vhost at /etc/apache2/sites-available/000-default-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-available/000-default-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/000-default-le-ssl.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting vhost in /etc/apache2/sites-enabled/000-default.conf to ssl vhost in /etc/apache2/sites-available/000-default-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Your existing certificate has been successfully renewed, and the new certificate
has been installed.
The new certificate covers the following domains: https://ploshop.co.in
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=ploshop.co.in
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/ploshop.co.in/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/ploshop.co.in/privkey.pem
Your cert will expire on 2021-11-17. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
ubuntu#ip-172-31-33-70:~$
Modify the locations based upon your installation. I am using the default paths.
Edit the file
Linux: /opt/lampp/apache/conf/extra/httpd-ssl.conf
Windows: /xampp/apache/conf/extra/httpd-ssl.conf
Locate the section that defines the port 443 listener:
Change this part:
<VirtualHost *:443>
...
SSLEngine on
SSLCertificateFile "conf/ssl.crt/server.crt"
SSLCertificateKeyFile "conf/ssl.key/server.key"
To:
<VirtualHost *:443>
...
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/ploshop.co.in/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/ploshop.co.in/privkey.pem"
Do not forget to restart apache.

Shell script to make site https using certbot and nginx

I know how to install ssl certificate using command-line. But i need a shell script this time to do this task.
Generally while doing this manually i first execute the fowllowing:-
sudo apt-get install certbot python-certbot-nginx
By executing the above i will be asked to continue or not?[Y/n]. I will enter 'Y'.Then i will execute the following command
sudo certbot --nginx
Executing the above will ask me to answer the following steps in ordered way:
Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel).
Agreement to Terms and Service [ (A)gree/(C)ancel: A ]
Consent to share development news and campaigns to my email address. [(Y)es/(N)o: N]
Which names would i like to activate HTTPS for? [Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): blank]
Redirection from http to https [Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2 ]
After doing all this steps https will be enabled. Now i need to do these things done programatically by shell file.I have figured out to install certbot and python-certbot-nginx using this
sudo apt-get install certbot python-certbot-nginx -y
But i do not know how to proceed further as i have never worked with shell scripts
PS: I am providing a sample result when i execute sudo certbot --nginx and enter details by myself.
sudo certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): mygmailid#gmail.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: N
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: example.com
2: www.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for example.com
http-01 challenge for www.example.com
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/demowebsite.conf
Deploying Certificate to VirtualHost /etc/nginx/sites-enabled/demowebsite.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/demowebsite.conf
Redirecting all traffic on port 80 to ssl in /etc/nginx/sites-enabled/demowebsite.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled
https://example.com and
https://www.example.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=example.com
https://www.ssllabs.com/ssltest/analyze.html?d=www.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
Your cert will expire on 2020-01-28. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
Though i am very late here but finally i did
as suggested by #JohnHanley in the comments. I went through the documentation and here is what i needed to execute the above mentioned steps in the question by command line.
run Obtain & install a certificate in your current webserver
-n Run without ever asking for user input. This may
require additional command line flags; the client will
try to explain which ones are required if it finds one
missing (default: False)
--nginx Obtain and install certificates using Nginx (default:False)
-d Domain names to apply. For multiple domains you can
use multiple -d flags or enter a comma separated list
of domains as a parameter. The first domain provided
will be the subject CN of the certificate, and all
domains will be Subject Alternative Names on the
certificate. The first domain will also be used in
some software user interfaces and as the file paths
for the certificate and related material unless
otherwise specified or you already have a certificate
with the same name. In the case of a name collision it
will append a number like 0001 to the file path name.
-m Email used for registration and recovery contact. Use
comma to register multiple emails, ex:
u1#example.com,u2#example.com. (default: Ask).
--redirect Automatically redirect all HTTP traffic to HTTPS for
the newly authenticated vhost. (default: Ask)
--agree-tos Agree to the ACME server's Subscriber Agreement
So the final command that i executed is below
certbot run -n --nginx --agree-tos -d example.com,www.example.com -m mygmailid#gmail.com --redirect

Install multiple yum packages on Centos(node) via Ansible?

Here is the part of YAMLcode that i am trying to run on a node which has operating system, Centos-7......
file hierarchy is
--> roles/install_tools/tasks/main.yml
its not working fine, YAML syntax is also valid and correct !
Could someone help me ?
---
- name: install the Development tools package group
yum:
name: "#Development tools"
state: present
- name: Install common software requirements
ignore_errors: yes
become: true
yum: pkg={{ item }} state=present
with_items:
- yum-plugin-fastestmirror
- epel-release
- git
- libyaml-devel
- libnet-devel
- libnetfilter_queue-devel
- libpcap-devel
- pcre-devel
- file-devel
- jansson-devel
- nss-devel
- libcap-ng-devel
- lua-devel
- binutils
- gmp
- gmp-devel
- make
- ld
- glibc.i686
- python-pip
- perl-Sys-Syslog
- readline-devel
- ncurses-devel
- openssl-devel
- easy-rsa
- flex
- bison
- pcre
- zlib
- zlib-devel
- libpcap
- libdnet
- libdnet-devel
- m4
- gcc
- mysql-devel
- python-devel
- geoip
- geoip-devel
- libffi-devel
- vim
- lsof
- wget
- mlocate
- htop
- net-tools
- traceroute
- tcpdump
- radiusclient-ng.x86_64
- gmp-devel
- iptables-services
- dnsmasq
- pptpd
- mariadb-devel
- lzo-devel.x86_64
- crontabs
- gcc
- make
- rpm-build
- autoconf.noarch
- zlib-devel
- pam-devel
- openssl-devel
The error it is showing is;
TASK [install_tools : Install common software requirements] ***********************
failed: [meracentos] (item=[u'yum-plugin-fastestmirror', u'epel-release', u'git', u'libyaml-devel', u'libnet-devel', u'libnetfilter_queue-devel', u'libpcap-devel', u'pcre-devel', u'file-devel', u'jansson-devel', u'nss-devel', u'libcap-ng-devel', u'lua-devel', u'binutils', u'gmp', u'gmp-devel', u'make', u'ld', u'glibc.i686', u'python-pip', u'perl-Sys-Syslog', u'readline-devel', u'ncurses-devel', u'openssl-devel', u'easy-rsa', u'flex', u'bison', u'pcre', u'zlib', u'zlib-devel', u'libpcap', u'libdnet', u'libdnet-devel', u'm4', u'gcc', u'mysql-devel', u'python-devel', u'geoip', u'geoip-devel', u'libffi-devel', u'vim', u'lsof', u'wget', u'mlocate', u'htop', u'net-tools', u'traceroute', u'tcpdump', u'radiusclient-ng.x86_64', u'gmp-devel', u'iptables-services', u'dnsmasq', u'pptpd', u'mariadb-devel', u'lzo-devel.x86_64', u'crontabs', u'gcc', u'make', u'rpm-build', u'autoconf.noarch', u'zlib-devel', u'pam-devel', u'openssl-devel']) => {"changed": false, "failed": true, "item": ["yum-plugin-fastestmirror", "epel-release", "git", "libyaml-devel", "libnet-devel", "libnetfilter_queue-devel", "libpcap-devel", "pcre-devel", "file-devel", "jansson-devel", "nss-devel", "libcap-ng-devel", "lua-devel", "binutils", "gmp", "gmp-devel", "make", "ld", "glibc.i686", "python-pip", "perl-Sys-Syslog", "readline-devel", "ncurses-devel", "openssl-devel", "easy-rsa", "flex", "bison", "pcre", "zlib", "zlib-devel", "libpcap", "libdnet", "libdnet-devel", "m4", "gcc", "mysql-devel", "python-devel", "geoip", "geoip-devel", "libffi-devel", "vim", "lsof", "wget", "mlocate", "htop", "net-tools", "traceroute", "tcpdump", "radiusclient-ng.x86_64", "gmp-devel", "iptables-services", "dnsmasq", "pptpd", "mariadb-devel", "lzo-devel.x86_64", "crontabs", "gcc", "make", "rpm-build", "autoconf.noarch", "zlib-devel", "pam-devel", "openssl-devel"], "msg": "No package matching 'ld' found available, installed or updated", "rc": 126, "results": ["yum-plugin-fastestmirror-1.1.31-40.el7.noarch providing yum-plugin-fastestmirror is already installed", "git-1.8.3.1-6.el7_2.1.x86_64 providing git is already installed", "binutils-2.25.1-22.base.el7.x86_64 providing binutils is already installed", "gmp-1:6.0.0-12.el7_1.x86_64 providing gmp is already installed", "make-1:3.82-23.el7.x86_64 providing make is already installed", "No package matching 'ld' found available, installed or updated"]}
Use of with_items with the ansible yum is now deprecated. You should pass a list to name: as follows;
- name: Install common software requirements
become: true
yum:
state: present
name:
- yum-plugin-fastestmirror
- epel-release
- git
- libyaml-devel
- libnet-devel
- libnetfilter_queue-devel
- libpcap-devel
- pcre-devel
- file-devel
- jansson-devel
- nss-devel
- libcap-ng-devel
- lua-devel
- binutils
- gmp
- gmp-devel
- make
- ld
- glibc.i686
- python-pip
- perl-Sys-Syslog
- readline-devel
- ncurses-devel
- openssl-devel
- easy-rsa
The previous solution will give you the following error:
Invoking "yum" only once while using a loop via squash_actions is deprecated. Instead of using a loop to supply multiple items and specifying `name: {{ item }}`,
Below code worked for me -->
File - yumInstall.yml
---
- hosts: localhost
gather_facts: False
serial: 1
tasks:
- name: 1. Install Apache Packages
yum: name={{ item }} state=present
with_items:
- httpd
- yum-plugin-fastestmirror
- epel-release
- git
- libyaml-devel
- libnet-devel
- libnetfilter_queue-devel
- libpcap-devel
- pcre-devel
- file-devel
- jansson-devel
- nss-devel
- libcap-ng-devel
- lua-devel
- binutils
- gmp
- gmp-devel
- make
# - ld
- glibc.i686
- python-pip
- perl-Sys-Syslog
- readline-devel
- ncurses-devel
- openssl-devel
- easy-rsa
- flex
- bison
- pcre
- zlib
- zlib-devel
Executing playbook:-
ansible-playbook -i hosts yumInstall.yml
[WARNING]: Found both group and host with same name: localhost
PLAY [localhost] *****************************************************************************************************************************************************************
TASK [1. Install Apache Packages] ************************************************************************************************************************************************
changed: [localhost] => (item=[u'httpd', u'yum-plugin-fastestmirror', u'epel-release', u'git', u'libyaml-devel', u'libnet-devel', u'libnetfilter_queue-devel', u'libpcap-devel', u'pcre-devel', u'file-devel', u'jansson-devel', u'nss-devel', u'libcap-ng-devel', u'lua-devel', u'binutils', u'gmp', u'gmp-devel', u'make', u'glibc.i686', u'python-pip', u'perl-Sys-Syslog', u'readline-devel', u'ncurses-devel', u'openssl-devel', u'easy-rsa', u'flex', u'bison', u'pcre', u'zlib', u'zlib-devel'])
PLAY RECAP ***********************************************************************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0
You can use simple list:
- name: Ensure useful util libs are present
yum:
name: ['httpie', 'the_silver_searcher', 'fasd', 'multitail', 'vim']
state: present
become: True
or as yaml list
- name: Ensure useful util libs are present
yum:
name:
- httpie
- the_silver_searcher
- fasd
- multitail
- vim
state: present
become: True
there is two errors in your config.
yum syntax error
with_items is deprecated now.
example:
- name: Install Tools
yum:
state: present
name:
- telnet
- htop

ERROR! this task 'apt_repository' has extra params

For the first time I am trying to use Ansible . When I tried to run a playbook I got this error:
ERROR! this task 'apt_repository' has extra params, which is only allowed in the following modules: command, shell, script, include, include_vars, add_host, group_by, set_fact, raw, meta
The error appears to have been in '/home/prism/Desktop/ansible/basic_package/main.yml': line 9, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: "Add Webupd8 ppa for youtube-dl"
^ here
main.yml :
---
- hosts: all
remote_user: root
tasks:
- name: "Upgrade the whole system"
apt: upgrade=dist update_cache=yes
- name: "Add Webupd8 ppa for youtube-dl"
apt_repository: repo ='ppa:nilarimogard/webupd8'
- name: "Install basic package"
apt: name={{ item }} state=installed
with_items:
- libffi-dev
- vnstat
- youtube-dl
- finger
- htop
- python3-dev
- axel
- curl
- fail2ban
- python-dev
- sendmail
- git
- python-software-properties
- software-properties-common
- python-pip
- nethogs
- unzip
- nmap
Looks like you have an extra space after repo parameter in the apt_repository task. Use the below code:
apt_repository: repo='ppa:nilarimogard/webupd8'

Resources