Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit b13b4a4b authored by florez_j's avatar florez_j
Browse files

Solved binary incompatibility issue of generated environment by conda...

Solved binary incompatibility issue of generated environment by conda installing h5py and numpy from conda-forge or default channels.
parent 5fa28ca9
No related branches found
No related tags found
No related merge requests found
name: pyenv5505
prefix: ./envs/pyenv5505 # Custom output folder
#prefix: ./envs/pyenv5505 # Custom output folder
channels:
- conda-forge
- defaults
......@@ -7,6 +7,7 @@ dependencies:
- python=3.11
- jupyter
- numpy
- h5py
- pandas
- matplotlib
- plotly=5.24
......@@ -14,7 +15,7 @@ dependencies:
- sphinx
- pip
- pip:
- h5py==3.10
# - h5py==3.10
- pybis==1.35
- igor2
- ipykernel
#!/bin/bash
# Define the name and location of the environment
# Define the name of the environment
ENV_NAME="pyenv5505"
ENV_PATH="./envs/$ENV_NAME" # Define a custom output folder
# Check if mamba is available and use it instead of conda for faster installation
if command -v mamba &> /dev/null; then
......@@ -11,19 +10,38 @@ else
CONDA_COMMAND="conda"
fi
# Create the conda environment with all dependencies
$CONDA_COMMAND create -y -p "$ENV_PATH" python=3.11 \
jupyter numpy pandas matplotlib plotly=5.24 scipy pip
# Create the conda environment with all dependencies, resolving from conda-forge and defaults
$CONDA_COMMAND create -y -n "$ENV_NAME" -c conda-forge -c defaults python=3.11 \
jupyter numpy h5py pandas matplotlib plotly=5.24 scipy pip
# Check if the environment was successfully created
if [ $? -ne 0 ]; then
echo "Failed to create the environment '$ENV_NAME'. Please check the logs above for details."
exit 1
fi
# Activate the new environment
source activate "$ENV_PATH" || conda activate "$ENV_PATH"
if source activate "$ENV_NAME" 2>/dev/null || conda activate "$ENV_NAME" 2>/dev/null; then
echo "Environment '$ENV_NAME' activated successfully."
else
echo "Failed to activate the environment '$ENV_NAME'. Please check your conda setup."
exit 1
fi
# Install pip packages in one go to avoid repeated initializations
pip install h5py==3.10 pybis==1.35 igor2 ipykernel sphinx
# Install additional pip packages only if the environment is activated
echo "Installing additional pip packages..."
pip install pybis==1.35 igor2 ipykernel sphinx
# Export the environment to a YAML file
$CONDA_COMMAND env export --prefix "$ENV_PATH" > "$ENV_PATH/environment.yaml"
# Check if pip installations were successful
if [ $? -ne 0 ]; then
echo "Failed to install pip packages. Please check the logs above for details."
exit 1
fi
# Optional: Export the environment to a YAML file (commented out)
# $CONDA_COMMAND env export -n "$ENV_NAME" > "$ENV_NAME-environment.yaml"
# Print success message
echo "Environment '$ENV_NAME' created successfully at '$ENV_PATH'."
echo "Environment configuration saved to '$ENV_PATH/environment.yaml'."
echo "Environment '$ENV_NAME' created and configured successfully."
# echo "Environment configuration saved to '$ENV_NAME-environment.yaml'."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment