Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when importing deepchem #3717

Closed
ryansamuel13 opened this issue Dec 14, 2023 · 2 comments 路 Fixed by #3718
Closed

Problem when importing deepchem #3717

ryansamuel13 opened this issue Dec 14, 2023 · 2 comments 路 Fixed by #3718

Comments

@ryansamuel13
Copy link

馃摎 Installation

I have been using deepchem on google colabs for quite a while now with the same code chunk to initialize my environment:

{!pip install --pre deepchem[tensorflow]

import deepchem as dc
dc.version

from rdkit import Chem

!pip install tensorflow
!pip install jedi
!pip install packaging
!git clone https://github.com/NVIDIA/apex
!cd /content/apex
!pip install -v --no-build-isolation --no-cache-dir /content/apex
!pip install transformers
!pip install simpletransformers
!pip install wandb
!pip install scikit-learn
!cd ..

import tensorflow as tf

import sys
!test -d bertviz_repo && echo "FYI: bertviz_repo directory already exists, to pull latest version uncomment this line: !rm -r bertviz_repo"

!rm -r bertviz_repo # Uncomment if you need a clean pull from repo

!test -d bertviz_repo || git clone https://github.com/jessevig/bertviz bertviz_repo
if not 'bertviz_repo' in sys.path:
sys.path += ['bertviz_repo']
!pip install regex

!git clone https://github.com/seyonechithrananda/bert-loves-chemistry.git}

But today when I tried to run this, deepchem appeared to install correctly but I get this error when I try to import deepchem:

ImportError Traceback (most recent call last)
in <cell line: 4>()
2 get_ipython().system('pip install --pre deepchem[tensorflow]')
3
----> 4 import deepchem as dc
5 dc.version
6

6 frames
/usr/local/lib/python3.10/dist-packages/deepchem/utils/safeops_utils.py in
2 import torch
3 from typing import Union, Optional, Tuple
----> 4 from deepchem.utils.dft_utils import ZType
5
6 eps = 1e-12

ImportError: cannot import name 'ZType' from 'deepchem.utils.dft_utils' (/usr/local/lib/python3.10/dist-packages/deepchem/utils/dft_utils/init.py)

@naseehasalam
Copy link
Contributor

Facing the same issue.

@GreatRSingh
Copy link
Contributor

Sorry about that, I have put up a patch for it.
#3718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants