Last active
May 18, 2022 23:06
-
-
Save kiyoon/7dd1d3fefdab686013cb7b98c5cbef3f to your computer and use it in GitHub Desktop.
Create Python executable under conda environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Make this script executable by | |
# chmod +x Python_gui_executable_conda.sh | |
# On Mac, | |
# go to properties of the file, choose open with, Terminal.app in Utilities folder. | |
# On Ubuntu you need to make another file. | |
# Follow the `ubuntu.desktop` script. | |
source ~/miniconda3/bin/activate | |
conda activate test_env | |
python ~/run.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://askubuntu.com/questions/138908/how-to-execute-a-script-just-by-double-clicking-like-exe-files-in-windows | |
[Desktop Entry] | |
Type=Application | |
Terminal=true | |
Name=Click-Script | |
Icon=utilities-terminal | |
Exec=gnome-terminal -e "bash -c './script.sh;$SHELL'" | |
Categories=Application; | |
# script.sh should look similar to mac.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo off | |
cls | |
D: | |
cd D:\Python\camera-tools\instagram_tools | |
"%windir%\System32\cmd.exe" /k ""D:\Python\miniconda3\Scripts\activate.bat" "D:\Python\miniconda3\envs\instatools" && python "D:\Python\camera-tools\instagram_tools\insta_annotate_and_upload.py" && exit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment