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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable support for Python 3 #30

Open
liuchbryan opened this issue Apr 10, 2017 · 1 comment
Open

Enable support for Python 3 #30

liuchbryan opened this issue Apr 10, 2017 · 1 comment

Comments

@liuchbryan
Copy link

When I do:

from pybo import solve_bayesopt

the following error occurs:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-d54e95bf7a31> in <module>()
     10 from data_loader import *
     11 from evaluator import *
---> 12 from pybo import solve_bayesopt

/Users/bryan.liu/anaconda/envs/Python3/lib/python3.5/site-packages/pybo/__init__.py in <module>()
      4 
      5 # pylint: disable=wildcard-import
----> 6 from .bayesopt import *
      7 
      8 from . import bayesopt

/Users/bryan.liu/anaconda/envs/Python3/lib/python3.5/site-packages/pybo/bayesopt.py in <module>()
     13 import functools
     14 import os.path
---> 15 import cPickle as pickle
     16 import collections
     17 

ImportError: No module named 'cPickle'

The error is not seen if I use a Python 2-based environment, which lead to my belief that this is due to the replacement of cPickle to a more general pickle from Python 3.

While I am happy to stick with Python 2 for the moment, it might be a good idea to extend support to Python 3 as well. I am happy to circle back once I am done with the main work involving this lovely library (though would appreciate if other who have more free time to spare to have a go at it!).

Thanks a lot!

@RokoMijic
Copy link

Python 3 would definitely be good.

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

No branches or pull requests

2 participants