jeonsworld / ViT-pytorch

Pytorch reimplementation of the Vision Transformer (An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale)
MIT License
1.94k stars 370 forks source link

ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location) #23

Closed yhangchen closed 3 years ago

yhangchen commented 3 years ago

Hi, by executing this

python3 train.py --name cifar10-100_500 --dataset cifar10 --model_type ViT-B_16 --pretrained_dir checkpoint/ViT-B_16.npz

I encounter the error:

Traceback (most recent call last):
  File "train.py", line 17, in <module>
    from apex import amp
  File "/home/tiger/.local/lib/python3.7/site-packages/apaex/__init__.py", line 13, in <module>
    from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
zhoufengfan commented 3 years ago

I think you have install the wrong apex. I have installed apex through the source code. You can refer to the official website and try again.

airsimonhan commented 3 years ago

git clone https://github.com/NVIDIA/apex cd apex python setup.py install

jhq1234 commented 1 year ago

git clone https://github.com/NVIDIA/apex cd apex python setup.py install

it works for me! Thanks!

luomi16 commented 10 months ago

!git clone https://github.com/NVIDIA/apex %cd apex !pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation ./

QQQ796 commented 5 months ago

git clone https://github.com/NVIDIA/apex cd apex python setup.py install these results fatal: destination path 'apex' already exists and is not an empty directory. python3: can't open file '/content/drive/MyDrive/UGDRE-main/setup.py': [Errno 2] No such file or director. How to do next??

WangJianQ-0118 commented 4 months ago

git clone https://github.com/NVIDIA/apex cd apex python setup.py install

it works for me! Thanks!

华为昇腾910b也是安装英伟达的吗

new-TonyWang commented 4 months ago

git clone https://github.com/NVIDIA/apex cd apex python setup.py install

it works for me! Thanks!

华为昇腾910b也是安装英伟达的吗 用这个 https://gitee.com/ascend/apex.git