I am just getting started with PyCharm and have imported a project from Eclipse.
Running on a virtual env, I was able to register a compiled pyd
file (PresPy). However, I still have an "unresolved reference" error. I also installed colormath
from the PyCharm tooltip recommendation.
When running the project I strangely do not have the pyd-related error. Instead, the interpreter complains about a different module and not on the 'package level'.
Error 1
Unresolved reference: 'rgb_color' in import statement:
# These 4 lines work fine
import copy
import random
from math import pi, degrees
from configuration import Color, Condition # From custom package
import colormath.color_diff
from PresPy import rgb_color # Refers to a .pyd.
Error 2
Stack trace:
....
File "x:\proj\src\color_logic\palette.py", line 14, in <module>
import colormath.color_diff
ImportError: No module named colormath.color_diff
Process finished with exit code 1
Content root is the project folder. Source folders are in a separate /src/
folder. An incomplete setup.py
stub is located in the content root. The project ran without errors from Eclipse on a different installation of pip install
:ed packages.
Below, this returns the source root folder (from related answer):
import os
print os.getcwd()
Under Project: ... > Project Interpreter1 the packages colormath
and PresPy
are both listed.
1: PyCharm Community Edition 2016.2.3