Within the DRE, it is currently not possible to use PIP to install packages. We recommend using Conda instead. First follow the steps below and then use for example Conda Prompt or Jupyter Lab to create and run your code. To install packages with Conda, use the following command:
- conda install <package>
- conda install -c conda-forge <package>
Open Ports Anaconda
In mydre.org, in tab: External Access, add the following rules ( last update: 2022-09-22):
Rule & Description
ports might change, easy to check with a local computer: open cmd, nslookup <url>
When using the External Access feature to enable internet access, make sure that the 'Use a proxy server' setting on your virtual machine is turned off. To do this, go to Start >> Settings (icon) >> Network & Internet >> Proxy, and turn of the setting 'Use a proxy server'.
Install Anaconda or Miniconda
With the abovementioned ports opened, you can go to these websites directly from your virtual machine. However, for proper logging of what goes into your workspace, we recommend you download these files outside the DRE and upload them to your workspace through the DRE Portal.
Always make sure you install programs as administrator, to make them available for other users of the same virtual machine. To do this, go to the folder where the install file is located, right-click and choose Run as Administrator.
Install JupyterLab (optional)
JupyterLab is a web-based development environment that can be used for a multitude of programming languages, including Python. It offers Jupyter Notebooks, where you can create and run your code, and document your work at the same time.
Open Anaconda prompt as administrator and run the following line of code:
conda install -c conda-forge jupyterlab
Set the default location for JupyterLab to the Z:-drive by following these two steps:
1. Create a folder Z:\Jupyter Labs (make sure you use this exact name)
2. Download the appropriate zip-file for Anaconda or Miniconda at the bottom of this article and upload it to your Workspace, then within the virtual machine extract the two files and
- Put the shortcut file in: C:\Users\Public\Desktop (the Desktop folder may be hidden, just type in the location in your file explorer)
- If you installed Miniconda, put the icon file in %ALLUSERSPROFILE%\Miniconda3\Menu (again, just type in the location in your file explorer)
This makes sure that all code and output is automatically created (and thus backed up) on the Z:-drive. It also allows any user to quickly start Jupyter Labs from the desktop.
This comes at the cost of a bit of performance, because the Z-drive is not as fast as the C-drive. Alternatively, create a Jupyter Labs folder on the C:-drive and change the settings of the shortcut obtained from the zip-file (right-click the shortcut and choose Properties, then change Target and Start-in from Z: to C:).
Step 3 (recommended):
Set your default browser to Google Chrome or Microsoft Edge: go to Start > Settings (icon on the left) > Apps > Default apps and change the setting for Web browser.
Always open Anaconda prompt in admin mode.