Coder Social home page Coder Social logo

albertovpd / set_up_conda-example Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 203 KB

Because upgrading / setting up a new computer is tiring and boring. Just run your scripts and don't waste your time.

Shell 100.00%
conda-environment python-libraries ubuntu-programs miniconda python3 linux-shell bash bash-script

set_up_conda-example's Introduction

Automating setups

There are 2 scripts:

  • linux_progams.sh just executes the commands to install the programs.
  • setup.sh creates a conda environment with the wanted python version and libraries.

Install Miniconda and wanted libraries in windows/linux.

Click to expand

For windows:

This repository is meant to create your Conda virtual environment with the packages you need. If you have already everything installed to run Conda, VScode and WSL, just navigate to ths folder:

bash setup.sh <name_for_the_environment> <python_version_like_3.8.2> 

If not, configurations have to be made.


WSL and VSCode

Click to expand
wsl –install

TROUBLESHOOTING

  • Run as administrator
wsl.exe --update
wsl –shutdown (it forces reboot)
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Preparing Conda (virtual environment)

Click to expand

Conda.

sudo apt-get update

If you can't run it, do the following:

  • Install this conda distribution
wget https://repo.anaconda.com/miniconda/Miniconda3-4.7.12.1-Linux-x86_64.sh

Configure some .conda scripts:

  • Create wsl.conf
Cd /etc
Sudo touch wsl.conf
Sudo nano wsl.conf
  • Write inside the following:
[network]
generateResolvConf = false
  • Create resolv.conf
sudo nano /etc/resolv.conf
  • Overwrite the inside with
nameserver 8.8.8.8
  • block that file
sudo chattr -f +i /etc/resolv.conf
  • Restart wsl with wsl --shutdown
  • Wait for a few seconds (15-30) as WSL takes some time to restart. Then, for running it again, just run: wsl
  • Activate Conda
Sudo apt-get update
Conda activate
  • Add the conda-forge source
conda config --add channels conda-forge

Clone the respository.

Disclaimer: if you can't maybe is that you need writing permissions on that folder. That can be changed as follows:

  • Navigate above the folder in which you want to clone the repo. In the terminal:
ls

(you should see the folder)

Chown –R <linux_user>:<linux_user data_folder/>



Creating a Conda Environment with a wanted name.

For Linux, just install the lastest MiniConda version from the official website. For Windows, follow the required steps above. Once done:

  • Navigate to this folder and activate Conda base:
conda activate
bash setup.sh <name_for_the_environment> <python_version_like_3.8.2> 
  • Follow the instructions

Configuring the installed libraries.

  • Check available environments: conda env list
  • Activate environment
conda activate <nameofyourenv>


About me:

Click to expand

alt




set_up_conda-example's People

Contributors

albertovpd avatar ferrero-felipe avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.