![]() It is important to note that library by default only loads packages from root directory, so we have to specify location of the package whenever we try to include a package installed in our home directory as shown below. To use the package from R, we call the function library. install.packages("remeta", repos="", lib="~/local/R_libs/") (3) Destination for the installed package, which, in this case, is the directory we just created “~/local/R_libs”. Most R packages including “rmeta” are available on “” which is also known as CRAN. (2) URL for the repository where we can obtain the package. There are three required parameters for “install.packages” function. To load R and run R console on BBC/Xanadu, enter: module load R/3.3.1Īpply function “install.packages” in the R console to download and install desired package. You are able to see all versions of R available R on server.įor this tutorial, we will use R/3.3.1. A list of available module will pop up as shown below. To check the latest version on server, use the command module avail. Load latest version of R available on server. It is helpful to create a new directory for R package installation. Python packages can also be installed using conda command which comes with Anaconda or miniconda packages detailed instructions are given here To exit python console, call command exit() The command should return 1.0.4 as shown below: To check version number type: print alfpy._version_ This command will load package alfpy we just installed. First, enter python in command line to access python console (all commands are for Python2): import alfpy We can test if the package has been successfully installed in Python. Where the number after = is version number of the package you wish to install. Then begin installation by entering: pip install -user alfpy=1.0.4 we first need to make sure current version of the package is uninstalled (note that flag “–user” is not required to uninstall). Try to install an older version if you encounter this issue. Sometimes the latest version of a package is not compatible with the latest Python version in BBC/Xanadu or some features you need only exist in a certain version. ![]() ![]() Note that flag -user is required because pip by default will install packages in root packages directory where most of users do not have permission to make changes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |