Reputation: 1672
I updated my Mac to Python 3.4.3, I changed my interpreter in PyCharm to be Python 3.4.3. When I try to run a test, it looks like it is still using Python 2.7.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 331, in run
testMethod()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Users/curtis.salisbury/Documents/local_copy/trunk/automation/selenium/src/tests/framework/test_ddt.py", line 4, in <module>
from .base_framework import BaseFramework
File "/Users/curtis.salisbury/Documents/local_copy/trunk/automation/selenium/src/tests/framework/base_framework.py", line 2, in <module>
from tests.base_test_case import BaseTestCase
File "/Users/curtis.salisbury/Documents/local_copy/trunk/automation/selenium/src/tests/base_test_case.py", line 7, in <module>
import http.client
ImportError: No module named http.client
What am I missing here to make this work in Python 3? I tried using an alias in terminal and when I do that, the interpreter changes to Python 3, however, when I run in PyCharm, it goes back to the 2.7?
Upvotes: 0
Views: 56
Reputation: 1672
I went into Edit Configurations and for some reason the interpreter in there was still Python 2. I changed it over to 3 and it worked superbly.
Upvotes: 1