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

problem when complie #31

Closed
guanqj932 opened this issue Mar 31, 2018 · 7 comments
Closed

problem when complie #31

guanqj932 opened this issue Mar 31, 2018 · 7 comments

Comments

@guanqj932
Copy link

Hi, hang,
when I compile the code, it shows the following error. Could you help to check where is wrong?

a615afa291515141a1c94502b0d68ac

@ksnzh
Copy link

ksnzh commented Apr 2, 2018

I have the same problem with python3.5.
And pytorch 0.3 is installed by conda.

@ksnzh
Copy link

ksnzh commented Apr 2, 2018

Update: Use the solution following #24 and it worked.

@guanqj932
Copy link
Author

I follow the instruction in #24 , the compile succeed, but it is wrong when I import encoding in python. It shows that No module named "encoding._ext.encoding_lib._endoding_lib"

@zhanghang1989
Copy link
Owner

Hi @guanqj932 , I guess you are in the package folder. Please retry importing in other folders.

@guanqj932
Copy link
Author

@zhanghang1989 Yeah, thank you.
In your docs, .../encoding.py,
layer = encoding.Encoding(C,K).double().cuda() ,
I think it should be layer = encoding.nn.Encoding(C,K).double().cuda()

@ksnzh
Copy link

ksnzh commented Apr 3, 2018

@zhanghang1989
import errors

ipython
Python 2.7.14 |Anaconda, Inc.| (default, Dec  7 2017, 17:05:42) 
Type "copyright", "credits" or "license" for more information.

IPython 5.4.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import encoding
  File "/home/kenzhang/miniconda2/lib/python2.7/site-packages/encoding/parallel.py", line 106
    Hang Zhang, Kristin Dana, Jianping Shi, Zhongyue Zhang, Xiaogang Wang, Ambrish Tyagi, Amit Agrawal. “Context Encoding for Semantic Segmentation. CVPR 2018
                                                                                                                                                              ^
SyntaxError: Non-ASCII character '\xe2' in file /home/kenzhang/miniconda2/lib/python2.7/site-packages/encoding/parallel.py on line 107, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

@zhanghang1989
Copy link
Owner

zhanghang1989 commented Apr 3, 2018

@ksnzh Can you try using anaconda3

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

No branches or pull requests

3 participants