Science_blog: Linux

Search This Blog

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, 2 March 2023

Save .pptx in .jpg or .png format in Ubuntu 22.4

 #########How to save .pptx file as .png pr .jpg####################

1. Create your ppt document 


2. Click on upper left 'file' tab



3. Click on 'Export' option for .jpg or .png and if you wan to save .pdf then click 'Export as pdf'


4. Then one window will pop up like this

5. Then click as your desire i.e .png or .jpg or.wmf or many and rename 



6. then click save and new window will pop up and choose scale

7. Now, .pptx saved as .png




Sunday, 19 February 2023

Linux Vs Macos: Which is better

 Let's talk about Linux Vs Macos. Something is more interesting and amazing. As, you may have noticed that the data science/engineering people works on either Linux or Macos and most high performance computing systems use Linux version because it allow all programming software while in widows, you need platform and they are slower as much and the reason is that all core are busy in other work and it allow one core only for that software and rest for windows. But, Macos allow you for other software too as linux and it comes with many. Hence, now days it demand has been increased to for data science. However, both (Linux and Macos) share Unix management system. Now the question is which one is strong ?



1. Open source vs Proprietary software

Both Linux and Macos use open source software system Unix. But, Linux distribution is entirely based on free software while part of Macos use of open source and rest are proprietary based for that you have to pay. Since, Linux is based on open source then you edit and modify if you are specialist in software work and still a freely robust distribution.


 2. Desktop environment

At the early stage, Linux did not come with desktop environment instead you have to use access with terminal. But, now a days, it allows many desktop environment i.e. Ubuntu, fedora and then with GNOME, XFCE, KDE, Deepin and many more.

GUI in Macos is standard and same for all customers or users and nothing new. 

3. Hardware  

You can install Linux on computers with any configurations. Even, you can install on Windows and Macos too by sing virtual machine and it require less space than others.

But with Macos, fortunately not after all it paid service.

4. Security

I think there is no any software which is 100% secure even Linux too and reason is very simple. It is free for everyone even for hackers too so they can develop tool to spoil it and may be they are trying but the chances is less in compression too windows and Macos and reason is these two are not free and currently, they are on top to earn money. 

However, with Linux, it is less chance and reason is free so if someone will hack my computer i can format computer and reinstall and another strong which make Linux system strong than others is commend line system (CLI). Hence, to access any files in systems to need permission every time this is reason why auto run type virsus could not affect any more.

And, another advantage, Linux is open source then there is no way to hide malicious or privacy violating code. Any one can remove it out.


5. Professional Carrier

Yes, it can help it to make your carrier in computer science and data science even more. As i said most data company and tech company prefer Linux system than the windows and Macos and if you are familiar with this there is high chance to select you. I have seen most high performance computing system prefer only Linux.

The only good point with macos that it also come with CLI or terminal based hence you can use it for that purpose but if other system don't have.



Conclusions

1. For carrier, Linux is better than Macos
2. Linux is high secure than Macos 
3. Macos allow video editing service than the Linux but you have to pay a lot.
4. In terms of price, Linux dominant as it is free.

Suggestion


Whole thing is depend upon you. Do you like to invest money or learning computer system. If you have money don't think too much buy Macos it gives you privacy but if you are at early stage of professional carrier then go for Linux to learn how to use terminal otherwise you could lost in Macos system and except watching video and internate suffering, you can not do any thing and you will say like my friends "Why Macos is so popular and what Macos does".  Remember, Macos do not allow neither MS office nor like MS office tools so be careful. It don't allow to access and modify word and excel files and  if you want then you have to pay a lot. 

Macos allow you to do video, pic, gif editing and creating apps for Macos beyond of this there is Windows. But Linux allows everything what i wrote above. One another point, In Europe, most people prefer Macos for personal use and for Carrier they choose Linux.







Thursday, 16 February 2023

How to install R library 'tidyverse' for updated R version 4.2.1 on latest Ubuntu 22.2

Dear all,

I was trying to install tidyverse in Rv4.2.1 in Ubuntu 22.2 ans whenever i as trying to install tidyverse I got an error "ERROR: configuration failed for package ‘curl’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/curl’

Warning in install.packages :

  installation of package ‘curl’ had non-zero exit status

* installing *source* package ‘xml2’ ...

** package ‘xml2’ successfully unpacked and MD5 sums checked

** using staged installation

Package libxml-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `libxml-2.0.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libxml-2.0' found

Package libxml-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `libxml-2.0.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libxml-2.0' found

Using PKG_CFLAGS=

Using PKG_LIBS=-lxml2

------------------------- ANTICONF ERROR ---------------------------

Configuration failed because libxml-2.0 was not found. Try installing:

 * deb: libxml2-dev (Debian, Ubuntu, etc)

 * rpm: libxml2-devel (Fedora, CentOS, RHEL)

 * csw: libxml2_dev (Solaris)

If libxml-2.0 is already installed, check that 'pkg-config' is in your

PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config

is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:

R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

--------------------------------------------------------------------

ERROR: configuration failed for package ‘xml2’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/xml2’

Warning in install.packages :

  installation of package ‘xml2’ had non-zero exit status

ERROR: dependency ‘curl’ is not available for package ‘httr’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/httr’

Warning in install.packages :

  installation of package ‘httr’ had non-zero exit status

ERROR: dependency ‘httr’ is not available for package ‘gargle’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/gargle’

Warning in install.packages :

  installation of package ‘gargle’ had non-zero exit status

ERROR: dependencies ‘httr’, ‘xml2’ are not available for package ‘rvest’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/rvest’

Warning in install.packages :

  installation of package ‘rvest’ had non-zero exit status

ERROR: dependencies ‘gargle’, ‘httr’ are not available for package ‘googledrive’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/googledrive’

Warning in install.packages :

  installation of package ‘googledrive’ had non-zero exit status

ERROR: dependencies ‘curl’, ‘gargle’, ‘googledrive’, ‘httr’ are not available for package ‘googlesheets4’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/googlesheets4’

Warning in install.packages :

  installation of package ‘googlesheets4’ had non-zero exit status

ERROR: dependencies ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/tidyverse’

Warning in install.packages :

  installation of package ‘tidyverse’ had non-zero exit status

"

#############################################################################

Well, to solve this i googled and got some way thereafter i tried myself. So solution is here:

1. > find("install.packages")

then i got 

[1] "package:utils"

2. > sessionInfo()

then i got 

R version 4.2.1 (2022-06-23)

Platform: x86_64-pc-linux-gnu (64-bit)

Running under: Ubuntu 22.10

Matrix products: default

BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.1

LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.1

locale:

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8       

 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   

 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C              

[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):

[1] compiler_4.2.1 tools_4.2.1   


Unfortunately, tidyverse is not installed.

Well, i again i googled.


3. > utils::install.packages("tidyverse")

I got this error

ERROR: configuration failed for package ‘curl’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/curl’

* installing *source* package ‘xml2’ ...

** package ‘xml2’ successfully unpacked and MD5 sums checked

** using staged installation

Package libxml-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `libxml-2.0.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libxml-2.0' found

Package libxml-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `libxml-2.0.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libxml-2.0' found

Using PKG_CFLAGS=

Using PKG_LIBS=-lxml2

------------------------- ANTICONF ERROR ---------------------------

Configuration failed because libxml-2.0 was not found. Try installing:

 * deb: libxml2-dev (Debian, Ubuntu, etc)

 * rpm: libxml2-devel (Fedora, CentOS, RHEL)

 * csw: libxml2_dev (Solaris)

If libxml-2.0 is already installed, check that 'pkg-config' is in your

PATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-config

is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:

R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

--------------------------------------------------------------------

ERROR: configuration failed for package ‘xml2’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/xml2’

ERROR: dependency ‘curl’ is not available for package ‘httr’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/httr’

ERROR: dependency ‘httr’ is not available for package ‘gargle’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/gargle’

ERROR: dependencies ‘httr’, ‘xml2’ are not available for package ‘rvest’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/rvest’

ERROR: dependencies ‘gargle’, ‘httr’ are not available for package ‘googledrive’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/googledrive’

ERROR: dependencies ‘curl’, ‘gargle’, ‘googledrive’, ‘httr’ are not available for package ‘googlesheets4’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/googlesheets4’

ERROR: dependencies ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/tidyverse’


The downloaded source packages are in

‘/tmp/RtmpAPocAk/downloaded_packages’

Warning messages:

1: In utils::install.packages("tidyverse") :

  installation of package ‘curl’ had non-zero exit status

2: In utils::install.packages("tidyverse") :

  installation of package ‘xml2’ had non-zero exit status

3: In utils::install.packages("tidyverse") :

  installation of package ‘httr’ had non-zero exit status

4: In utils::install.packages("tidyverse") :

  installation of package ‘gargle’ had non-zero exit status

5: In utils::install.packages("tidyverse") :

  installation of package ‘rvest’ had non-zero exit status

6: In utils::install.packages("tidyverse") :

  installation of package ‘googledrive’ had non-zero exit status

7: In utils::install.packages("tidyverse") :

  installation of package ‘googlesheets4’ had non-zero exit status

8: In utils::install.packages("tidyverse") :

  installation of package ‘tidyverse’ had non-zero exit status

...................................................................................................................................

4. So, i tried to install Rculr througn Rconsol

> install.packages("RCurl")

and geot this error 

ERROR: dependency ‘curl’ is not available for package ‘httr’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/httr’

ERROR: dependency ‘httr’ is not available for package ‘gargle’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/gargle’

ERROR: dependency ‘httr’ is not available for package ‘rvest’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/rvest’

ERROR: dependencies ‘gargle’, ‘httr’ are not available for package ‘googledrive’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/googledrive’

ERROR: dependencies ‘curl’, ‘gargle’, ‘googledrive’, ‘httr’ are not available for package ‘googlesheets4’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/googlesheets4’

ERROR: dependencies ‘googledrive’, ‘googlesheets4’, ‘httr’, ‘rvest’ are not available for package ‘tidyverse’

* removing ‘/home/rajiv/R/x86_64-pc-linux-gnu-library/4.2/tidyverse’

5. Then i  tried with linux terminal 

6. sudo apt-get update

7. sudo apt-get install libxml2-dev

8. sudo apt-get install r-cran-xml

9. sudo apt-get install libcurl4-openssl-dev r-base

10. R -q -e "install.packages(c('curl'))"

11. sudo apt install r-cran-curl

12. Then again I tried 

> utils::install.packages("tidyverse")

and got no error 

13. then 

> library('tidyverse')

and showed 

── Attaching packages ───────────────────────────────────────────────── tidyverse 1.3.2 ──

✔ ggplot2 3.4.1     ✔ purrr   1.0.1

✔ tibble  3.1.8     ✔ dplyr   1.1.0

✔ tidyr   1.3.0     ✔ stringr 1.5.0

✔ readr   2.1.4     ✔ forcats 1.0.0

── Conflicts ──────────────────────────────────────────────────── tidyverse_conflicts() ──

✖ dplyr::filter() masks stats::filter()

✖ dplyr::lag()    masks stats::lag()


Hurreyyyyyyyy!!!!!!!!!!!!


So the problem was not with R updated version. Indeed, it was problem with Ubuntu new version 22.2. Hence, you need to install Rcurl through terminal first then try by R consol.

Ubuntu does not allow any progrram directly. It reueirs lib files which were missing in updated version. So, first update ubuntu through terminal and then install lib files.


Refernces:

https://stackoverflow.com/questions/52082543/curl-package-not-available-for-several-r-packages

https://stackoverflow.com/questions/7765429/unable-to-install-r-package-in-ubuntu-11-04

https://stackoverflow.com/questions/20671814/non-zero-exit-status-r-3-0-1-xml-and-rcurl

https://stackoverflow.com/questions/72578482/issues-installing-tidyverse-package






The Rise of Generative AI: Transforming Creativity and Innovation

  Introduction Generative AI, a subset of artificial intelligence, has revolutionized the way we approach creativity and problem-solving. By...