allenai / allenai/allenact

python 3.8 is not compatible: Solving environment is impossible

未关闭
#387 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
383
派生
59
PR 合并指标
30 天内没有已合并 PR

描述

## Problem
**Bug 1**
`conda env create --file ./conda/environment-base.yml --name $MY_ENV_NAME`
The yml file use python 3.8, conda can not solving environment.
If it change to python 3.6, every install step will work.

But python 3.6 env will cause new problem in installing robothor_plugin when buliding opencv-python wheel(new version can not bulid successful).
I use `opencv-python==4.5.4.60` in `extra_requirements_txt` to solve it.

Downloading dataset can not work well in python 3.6 too.
`bash datasets/download_navigation_datasets.sh robothor-objectnav`

**Bug 2**
File "/home/fy/allenact/allenact/base_abstractions/distributions.py", line 3, in
from typing import Any, Union, Callable, TypeVar, Dict, Optional, cast, Protocol
ImportError: cannot import name 'Protocol'

My solution
`pip install typing_extensions==4.1.1`

/home/fy/allenact/allenact/base_abstractions/distributions.py

```
# from typing import Any, Union, Callable, TypeVar, Dict, Optional, cast, Protocol
from typing import Any, Union, Callable, TypeVar, Dict, Optional, cast
from typing_extensions import Protocol
```

----------------------------------

**Bug 3**
File "/home/fy/anaconda3/envs/allenact/lib/python3.6/site-packages/imageio_ffmpeg/_utils.py", line 6, in
import importlib.resources
ModuleNotFoundError: No module named 'importlib.resources'

My solution
pip install importlib-resources==5.4.0

/home/fy/anaconda3/envs/allenact/lib/python3.6/site-packages/imageio_ffmpeg/_utils.py

```
# import importlib.resources
import importlib_resources as importlib_resources
```
```
def _get_bin_dir():
if sys.version_info < (3, 9):
context = importlib_resources.path("imageio_ffmpeg.binaries", "__init__.py")
else:
ref = importlib_resources.files("imageio_ffmpeg.binaries") / "__init__.py"
context = importlib_resources.as_file(ref)
with context as path:
pass
# Return the dir. We assume that the data files are on a normal dir on the fs.
return str(path.parent)
```
## Desktop
Ubuntu 22.04

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。