anidata / palantiri

Web crawler to collect data on ht
MIT License
17 stars 8 forks source link

Pip claims package installed in virtual environment, but ImportError raised when attempting to import palantiri #2

Closed coxjonc closed 7 years ago

coxjonc commented 7 years ago

I'm working in a virtual environment created by conda. When I run pip install -e . to install palantiri from source, it installs all the dependencies correctly, but fails to install palantiri itself. Instead of being built to a site-packages directory within the virtual environment, pip says that palantiri is already installed and points to the location of the source files. As a result, attempts to run python setup.py test throw an ImportError when the script tries to import palantiri, I assume because the source file directory isn't on the python PATH.

I've attached the full verbose output of pip install to help with debugging.

error.txt

coxjonc commented 7 years ago

I think the issue is that the palantiri.egg-link soft link generated in site-packages when you run pip install -e . points to the root of the project, but the root directory is not itself a python package, so the interpreter can't find a module named palantiri to import.

I thought this was just an issue with trying to install in dev mode, so I tried installing without the -e flag, but even then pip says the installation requirement is already satisfied and points to the root of the source directory.

coxjonc commented 7 years ago

Solved this issue by just dropping Anaconda. A lot easier to control environments I've rolled myself with virtualenv