mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-28 04:06:54 +00:00
Update install_proxmenux.sh
This commit is contained in:
parent
14f102a4d9
commit
bdbea2c4dc
@ -100,18 +100,31 @@ done
|
|||||||
|
|
||||||
# Set up virtual environment ==============================
|
# Set up virtual environment ==============================
|
||||||
|
|
||||||
msg_info "Setting up the virtual environment for translations..."
|
# msg_info "Setting up the virtual environment for translations..."
|
||||||
if [ ! -d "$VENV_PATH" ]; then
|
|
||||||
python3 -m venv "$VENV_PATH"
|
|
||||||
|
|
||||||
|
|
||||||
|
#mkdir -p /opt
|
||||||
|
#chmod 755 /opt
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -d "$VENV_PATH" ] || [ ! -f "$VENV_PATH/bin/activate" ]; then
|
||||||
|
msg_info "Creating the virtual environment..."
|
||||||
|
python3 -m venv --system-site-packages "$VENV_PATH"
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f "$VENV_PATH/bin/activate" ]; then
|
if [ ! -f "$VENV_PATH/bin/activate" ]; then
|
||||||
msg_error "Failed to create virtual environment. Please check your Python installation."
|
msg_error "Failed to create virtual environment. Please check your Python installation."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
source "$VENV_PATH/bin/activate"
|
source "$VENV_PATH/bin/activate"
|
||||||
|
|
||||||
|
|
||||||
|
pip install --upgrade pip
|
||||||
|
|
||||||
|
|
||||||
if pip install --break-system-packages --no-cache-dir googletrans==4.0.0-rc1; then
|
if pip install --break-system-packages --no-cache-dir googletrans==4.0.0-rc1; then
|
||||||
msg_ok "Virtual environment configured and googletrans installed."
|
msg_ok "Virtual environment configured and googletrans installed."
|
||||||
else
|
else
|
||||||
@ -122,6 +135,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$VIRTUAL_ENV" ]; then
|
if [ -n "$VIRTUAL_ENV" ]; then
|
||||||
deactivate
|
deactivate
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user