Giter VIP home page Giter VIP logo

Comments (15)

hainm avatar hainm commented on July 30, 2024 1

@JSurayut is there any chance that you have pytraj source code in your desktop and you opened jupyter in the location having pytraj?

from pytraj.

hainm avatar hainm commented on July 30, 2024 1

from pytraj.

hainm avatar hainm commented on July 30, 2024

hi @JSurayut, how did you install pytraj?
(e.g: you can install AmberTools that includes pytraj: https://ambermd.org/GetAmber.php)

from pytraj.

JSurayut avatar JSurayut commented on July 30, 2024

from pytraj.

JSurayut avatar JSurayut commented on July 30, 2024

No, I have checked in my folder that I opened jupyter, It does not have any pytraj source code.

from pytraj.

hainm avatar hainm commented on July 30, 2024

um, that's odd. can you try import parmed; print(parmed) to see if that works?

from pytraj.

hainm avatar hainm commented on July 30, 2024

Your issue is similar to #1565

from pytraj.

JSurayut avatar JSurayut commented on July 30, 2024

um, that's odd. can you try import parmed; print(parmed) to see if that works?

I try this and It show a message


ImportError Traceback (most recent call last)
in ()
----> 1 import parmed

/home/cadd/amber22/lib/python3.10/site-packages/parmed/init.py in ()
19
20 from . import exceptions, periodic_table, residue
---> 21 from . import unit, utils
22 from .topologyobjects import *
23 from .structure import Structure, StructureView

/home/cadd/amber22/lib/python3.10/site-packages/parmed/utils/init.py in ()
2 from ..exceptions import MoleculeError as _MoleculeError
3 from .pairlist import find_atom_pairs
----> 4 from ..topologyobjects import Atom
5 from shutil import which
6 from typing import List, Set, Tuple

/home/cadd/amber22/lib/python3.10/site-packages/parmed/topologyobjects.py in ()
7 import enum
8 import math
----> 9 from functools import cached_property
10 from typing import Optional
11 import warnings

ImportError: cannot import name 'cached_property'

from pytraj.

hainm avatar hainm commented on July 30, 2024

{quote}
----> 9 from functools import cached_property
10 from typing import Optional
11 import warnings

ImportError: cannot import name 'cached_property'
{quote}

This cached_property was added to Python since 3.8 release. I bet you're mixing different python versions here.

import sys
print(sys.version_info)
print(sys.path) # check this to see any mixing. 

what does this say? (e.g: you're supposed to use python 3.10)

from pytraj.

freeenergylab avatar freeenergylab commented on July 30, 2024

I encountered the same problem. Now AmberTools22 will download and install python 3.11 version miniconda. When the pytraj module is compilered, the following error appeared:
bug
However, when I used python 3.9 in my own conda enviroment, the pytraj can be installed successfully.

from pytraj.

freeenergylab avatar freeenergylab commented on July 30, 2024

Thanks, Hai Nguyen. I can compile ambertools23 successfully where I noticed one update.3 you patched for AmberTools23.
And I noticed that you have fixed the compatibility issue between Python 3.11 and CPython for pytraj. Nice work! Cheers!

from pytraj.

JSurayut avatar JSurayut commented on July 30, 2024

I try it the message shows

sys.version_info(major=3, minor=6, micro=9, releaselevel='final', serial=0)
['', '/home/cadd/amber22/lib/python3.10/site-packages', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3/dist-packages/IPython/extensions', '/home/cadd/.ipython']

from pytraj.

hainm avatar hainm commented on July 30, 2024

from pytraj.

JSurayut avatar JSurayut commented on July 30, 2024

Your jupyter notebook comes from python 3.6 but the one in amber is 3.10

What should I do, could you give me some advice please?

from pytraj.

hainm avatar hainm commented on July 30, 2024

it's hard to tell you what do to if I don't know the detail.

Basically:

  • which python path did you use to compile ambertools? how (exactly) did you run jupyter?
  • saying you find it, source the amber.sh as the manual suggested, then run /path/to/python3 -m jupyter notebook
  • in the notebook, import sys; print(sys.version); print(sys) to make sure you are using the correct python path?

from pytraj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.