@Deniz_Bilgin yeah some packages are not compatible with runtime.
- Use a Stable Version
Try installing a known working version:
%pip install transformers==4.41.2
import time
max_attempts = 3
attempt = 0
while attempt < max_attempts:
try:
import transformers
break
except ImportError as e:
attempt += 1
print(f"Attempt {attempt} failed. Retrying...")
time.sleep(10)