![]() Since 3.2 Thonny will work in portable mode simply when being run from a removable drive. You can put the Thonny+Python bundle onto an external hard-drive or USB stick and run it in compatible systems without installing anything. Since version 3.2 the same dialog also allows installing from a requirements.txt file. Alternatively have them use them from the command line, but pay attention as to whether to use -user or not. If you use only a couple of packages then have your students install these one-by-one via "Tools => Manage packages". Prescribing 3rd party packages to students who installed Thonny themselves This means that the shared packages you installed into the bundled Python's site-packages need to be reinstalled after reinstalling/upgrading Thonny. NB! Each time you re-install Thonny, its program directory will be cleaned first. The easiest way for this is to open Thonny, select "Tools => Open system shell." and use command-line pip. Just pip-install the required packages and plug-ins directly into the site-packages of the bundled Python (or external Python if so configured). You can arrange your shared Thonny so that the students can start off with the same set of 3rd party packages. environ = "1234" Preparing shared 3rd party packages and plug-ins Since Thonny 3.3 an empty file with instructions is provided, for earlier versions you need to create it yourself.įor example, if you want to use a separate Python installation for the backend, the defaults.ini should be something like this: defaults.iniįile defaults.ini under thonny package can be used to override default/initial configuration values. There are various ways for customizing Thonny for all users. This directory can be opened when you select "Tools => Open Thonny data directory" in Thonny. else if installed on Linux ⇒ $XDG_CONFIG_HOME/Thonny (usually ~/.config/Thonny).else if installed on macOS ⇒ ~/Library/Thonny.else if installed on Windows ⇒ %APPDATA%\Thonny.else if pip-installed into a virtual environment (and it's not the special "private" environment created by Thonny's Linux installer) ⇒.else if Thonny runs in portable mode ⇒ user_data under the main directory of the program (Since 3.2).if environment variable THONNY_USER_DIR is defined ⇒ the value of this variable.The path of this directory is chosen as follows: Independently of the Thonny program files' location, on the first run it creates a directory which is used for storing user configuration and logs. Location of Thonny's user data (configuration and log files) You can install Thonny either locally or to a network drive. The installation procedure can be scripted (see for instructions about command line usage of the Windows installer). Most likely the admins will want to install it for all users (see above). ![]() (Depending on your lab set-up you may want to recommend students to install into. If the computer lab supports persistent user profiles and the users' disk quota is big enough, then the single user deployment scheme is also suitable in the classroom setting. If the target directory is outside of /home, the installer creates a launcher for all users. In Linux you can either install the thonny package from your distro's repository (this may be an older version) or you can simply run the bundle installer with sudo and choose a target directory which is accessible for all users. Since 3.3.12 this trick doesn't affect installation mode anymore.) ![]() ![]() (In older versions, in order to get "all users" install you had to right-click the installer and select "Run as administrator". If you want to start using another mode, then you need to uninstall Thonny first. If Thonny is already installed, then previous mode will be chosen automatically. Since Thonny 3.3.12, Windows installer will start with a dialog for choosing "For me only" or "All users" install mode. For macOS it's a non-issue - you simply copy the app bundle where you want it. Therefore the Windows and Linux installers don't require admin privileges and install under the user home ( %LOCALAPPDATA%\Programs\Thonny or ~/apps/thonny respectively) by default. The main Thonny+Python bundles are designed to be installed by the end user. NB! These instructions apply to Thonny since version 3.0 Single user ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |