Skip to content

Update to be compatible with Python 3#5

Open
burntyellow wants to merge 1 commit intoADicksonLab:masterfrom
burntyellow:kimwong
Open

Update to be compatible with Python 3#5
burntyellow wants to merge 1 commit intoADicksonLab:masterfrom
burntyellow:kimwong

Conversation

@burntyellow
Copy link
Copy Markdown

In testing the tutorial

https://www.livecomsjournal.org/article/10607-a-suite-of-tutorials-for-the-westpa-rare-events-sampling-software-article-v1-0

under Matt's Python 3 WESTPA, I encountered some errors. I attempted to fix some of these messages. My changes should have a #KFW in front of the line. Can you also take a look at the provided WExplore_analysis.py in the tutorial? I'm getting a

ModuleNotFoundError: No module named 'westpa.binning'

when executing it but it may be that my WESTPA environment is not correct?

@@ -1 +1 @@
build/lib.linux-x86_64-2.7/wex_utils.so No newline at end of file
build/lib.linux-x86_64-3.7/wex_utils.cpython-37m-x86_64-linux-gnu.so No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if there should be a .so file included in the repo since this could cause compatibility issues.

import pandas as pd
import heapq
import cPickle as pickle
#KFW import cPickle as pickle
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be better handled by:

try:
    import cPickle as pickle
except ImportError:
    import pickle

I guess this depends on whether we want to maintain python 2/3 compatibility or if we're dropping python2 completely.

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 this pull request may close these issues.

2 participants