Assignment6 error

168 views
Skip to first unread message

zhicong zhao

unread,
Dec 8, 2020, 11:37:40 PM12/8/20
to cmpt-295-sfu
SFU ID: 301356852
Github username:kleinZhaoKen
Question:when I run the python3 decrypt.pyc -F Example_Pipeline.enc -C Example_Pipeline.csv  and it show RuntimeError: Bad magic number in .pyc file , and I check the decrypt.pyc and run.sh in my GitHub ,and the travis ci show that two file were passed , please help ,looking forward to your reply , thank you.
25691607486241_.pic.jpg
5381607484710_.pic.jpg
5391607484719_.pic.jpg

b.minh96

unread,
Dec 9, 2020, 2:05:02 PM12/9/20
to cmpt-295-sfu
I suspect that this issue is caused by the python version you're running. Usually you cannot run the compiled bytecode .pyc generated from older python version with a newer python version.
If you run this command : "file decrypt.pyc".
You'll see that the python version that generates this pyc is 3.6 and you cannot run it a newer python version.
Check the python version you're running and make sure it's python 3.6.

zhicong zhao

unread,
Dec 9, 2020, 11:08:55 PM12/9/20
to cmpt-295-sfu
I was checked my python is 3.8 ,and how to change it to python 3.6?or Just install python 3.6 and I can use it?
在 2020年12月9日星期三 UTC+8下午12:37:40,zhicong zhao写道:

Parmida Vahdatnia

unread,
Dec 9, 2020, 11:32:28 PM12/9/20
to cmpt-295-sfu
you can check this link out for instructions on installation and changing default python command
Alternatively, you can just use the python3.6 command 

Carter Kelly

unread,
Dec 10, 2020, 12:16:47 AM12/10/20
to cmpt-295-sfu
How can I fix this on CSIL? I don't think I have access to install python 3.6, and it currently uses 3.7. I can use the python3.6 command, but then it says colorama can't be found because it's only installed under 3.7.

zhicong zhao

unread,
Dec 10, 2020, 8:36:09 AM12/10/20
to cmpt-295-sfu
now I already change the python3 to python3.6.12 , but when I run the  python3 decrypt.pyc -F Example_Pipeline.enc -C Example_Pipeline.csv and it show the no module named 'pandas',please help, thanks.
在 2020年12月9日星期三 UTC+8下午12:37:40,zhicong zhao写道:
SFU ID: 301356852
WeChat547dd3cb5bef9d396b5538ea0bf7163d.png

Parmida Vahdatnia

unread,
Dec 10, 2020, 5:17:05 PM12/10/20
to cmpt-295-sfu

This can happen because you've installed pandas to another version of python and are running the program using a different python version.
use "which pip" to know with which pip version pandas was installed. 

zhicong zhao

unread,
Dec 10, 2020, 7:42:03 PM12/10/20
to cmpt-295-sfu
So I need to install pip3 again into the current python3.6, right?
在 2020年12月11日星期五 UTC+8上午6:17:05,Parmida Vahdatnia写道:
Reply all
Reply to author
Forward
0 new messages