Open RunziiMo opened 6 years ago
@RunziiMo did you use the script
scripts/start_ipython_notebook.sh
to start Jupyter? Also make sure you activated your conda environment (if you used that) before running the script.
@orionr I used that but it didn't work. And yeah I can successfully excute python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
and it shows Success
. Luckily, I solved import error problem now. But import caffe2.python.core still stuck.
@RunziiMo Could you please explain how you solve the import problem?
@nykabhishek I found I forget to add export PYTHONPATH=/usr/local:$PYTHONPATH
to ~/.bash_profile. And I found that the install tutorial changed on caffe2.ai, I can now install caffe2 by Pre-Built Binaries on Mac. So I execute sudo rm -rf /usr/local/caffe*
and reinstall by conda install -c caffe2 caffe2
. And import problem solved.
Yeah even I figured it out. I had a typo in my PYTHONPATH
. Thanks for the update. Maybe we can go ahead and close this issue.
@nykabhishek I build caffe2 from source. And I can successfully execute python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
and it shows Success. But when I execute python caffe2/python/operator_test/relu_op_test.py
to test whether GPU support. It shows a caffe2_pb2
Import Error. So may I ask you how do you solve your caffe2_pb2
Import Error?
I'm using jupyter on my mac, I found that it would stuck there and there would be no response if I ever execute
and jupyter would simply show
ln [ * ]
for ever I can successfully execute this through my python command line. Besides, I'm not using GPU support, and this problem happens in jupyter notebook. When I switch to jupyter console, it shows