TensorMol icon indicating copy to clipboard operation
TensorMol copied to clipboard

installation is unsuccessful

Open xuzhang5788 opened this issue 7 years ago • 10 comments

I followed your installation guide as

git clone https://github.com/jparkhill/TensorMol.git cd TensorMol

If you are using python2x

sudo pip install -e .

If you are using python3x

sudo pip3 install -e .

I got Successfully installed TensorMol-0.2

But when I run python test.py

I got File "test.py", line 4, in from TensorMol import * ImportError: No module named 'TensorMol'

Any help is highly appreciated

xuzhang5788 avatar May 23 '18 18:05 xuzhang5788

Pay attention to which python you installed it with. If you pip3 install you should run it with python3. If you pip install (on most systems) you should run it with python2. Also make sure environmental variable PYTHON_PATH includes the TensorMol directory.

Best- John

jparkhill avatar May 23 '18 18:05 jparkhill

I’ve found that sometimes sudo pip actually refers to pip3 on my current Ubuntu 16.04 desktop. Specifying sudo pip2 can help if thats the issue.

jeherr avatar May 23 '18 19:05 jeherr

My python is python3 and I used sudo pip3.

xuzhang5788 avatar May 23 '18 19:05 xuzhang5788

What operating system? Are you using anaconda, some other type of virtual environtment manager, or your systems python?

jeherr avatar May 23 '18 19:05 jeherr

My python 3 is using anaconda.

xuzhang5788 avatar May 23 '18 19:05 xuzhang5788

It can also be helpful to print the output of

which python
which pip
python --version
pip --version

to make sure they all agree (or which python3 and which pip3 if you use those).

jordangarside avatar May 23 '18 20:05 jordangarside

/home/xuzhang/anaconda3/bin/python /home/xuzhang/anaconda3/bin/pip Python 3.5.5 :: Anaconda custom (64-bit) pip 10.0.1 from /home/xuzhang/anaconda3/lib/python3.5/site-packages/pip (python 3.5)

xuzhang5788 avatar May 23 '18 20:05 xuzhang5788

Try just running sudo pip install -e . again from the TensorMol directory.

It should work, if not then you could just wait a few weeks and it'll likely have a few changes making it easier to install.

jordangarside avatar May 24 '18 00:05 jordangarside

I’m thinking that running pip with sudo is not using the anaconda version of pip. Sudo would likely point to the system version of pip. Try running without sudo or adding the —user option to pip.

jeherr avatar May 24 '18 10:05 jeherr

Thank you @jeherr, I used sudo pip3 install --user -e . it looks okay. But I import TensorMol, I got

Searching for Installed Optional Packages... Pyscf is not installed -- no ab-initio sampling

When I run test.py, I got nans for every item.

xuzhang5788 avatar May 24 '18 18:05 xuzhang5788