ImportError: No module named 'pyConTextNLP.pyConText' - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: ImportError: No module named 'pyConTextNLP.pyConText' (/thread-11107.html) |
ImportError: No module named 'pyConTextNLP.pyConText' - alaksh16 - Jun-22-2018 Hi, I working on a python package called pyConTextNLP. I have issue importing these modules. I'm using python 3.5 and doing all the stuff inside a virtual environment. I'm getting Import error for pyConTextNLP.pyConText and pyConTextNLP.itemData and not for other packages. Any help is appreciated. Thank you! import pyConTextNLP.pyConText as pyConText import pyConTextNLP.itemData as itemData import networkx as nxImportError Traceback (most recent call last) <ipython-input-3-5362fa3a3667> in <module>() ----> 1 import pyConTextNLP.pyConText as pyConText 2 import pyConTextNLP.itemData as itemData 3 import networkx as nx ImportError: No module named 'pyConTextNLP.pyConText' RE: ImportError: No module named 'pyConTextNLP.pyConText' - gontajones - Jun-22-2018 How did you install the pyConTextNLP module in your virtual env? RE: ImportError: No module named 'pyConTextNLP.pyConText' - alaksh16 - Jun-22-2018 I installed some dependencies and then did pip install pyConTextNLP RE: ImportError: No module named 'pyConTextNLP.pyConText' - gontajones - Jun-22-2018 I've just created a Docker Image (ubuntu) with python3 + pip3, then: pip3 install pyConTextNLP Installed: pyConTextNLP-0.6.2.0-py2.py3-none-any.whl Installed: networkx-1.11-py2.py3-none-any.whl Installed: decorator-4.3.0-py2.py3-none-any.whlAnd now I'm able to import pyConTextNLP. When you installed the pyConTextNLP using pip, you were inside your virtual env, right? Your error is that you are trying to import pyConTextNLP.pyConText, and it doesn't exist. Reading the github docs of the module I saw this way to import it, maybe it'll help you: import pyConTextNLP.pyConTextGraph as pyConText import pyConTextNLP.itemData as itemData RE: ImportError: No module named 'pyConTextNLP.pyConText' - alaksh16 - Jun-22-2018 Yes, I was inside virtualenv. I tried it on my windows laptop and imac and both time I got same error. maybe I'm doing some mistake while installing. RE: ImportError: No module named 'pyConTextNLP.pyConText' - gontajones - Jun-22-2018 Check my post again, the second part... RE: ImportError: No module named 'pyConTextNLP.pyConText' - alaksh16 - Jun-22-2018 It worked!! thanks, Is that the version github describes and the version that I have installed from python repository different? RE: ImportError: No module named 'pyConTextNLP.pyConText' - gontajones - Jun-22-2018 I don't think so, if you use pip to install and upgrade you'll be good to go. RE: ImportError: No module named 'pyConTextNLP.pyConText' - alaksh16 - Jun-22-2018 Ok. Thanks |