3
votes

So I have a virtual environment where I installed the package utility. I know I installed it because when I do pip install utlity and get this output:

Requirement already satisfied: utility in ./anaconda3/envs/SpliceBuster/lib/python3.5/site-packages (1.0)

Here's the output of print (sys.path):

['', '/home/joel/anaconda3/envs/SpliceBuster/lib/python35.zip', '/home/joel/anaconda3/envs/SpliceBuster/lib/python3.5', '/home/joel/anaconda3/envs/SpliceBuster/lib/python3.5/plat-linux', '/home/joel/anaconda3/envs/SpliceBuster/lib/python3.5/lib-dynload', '/home/joel/anaconda3/envs/SpliceBuster/lib/python3.5/site-packages']

When I do import utility in a python shell, I get:

Traceback (most recent call last):
File "<stdin>", line 1, in
ImportError: No module named 'utility'

It's confusing to me because I can import numpy, and when I do pip install numpy, the output is:

Requirement already satisfied: numpy in ./anaconda3/envs/SpliceBuster/lib/python3.5/site-packages (1.12.1)

which means that both utility and numpy are installed in the same folder, but numpy is found whereas utility isn't.

Any thoughts on what could be going on?


Other info:

which python:

/home/joel/anaconda3/envs/SpliceBuster/bin/python

python -V:

Python 3.5.0 :: Continuum Analytics, Inc.

2
Where do you try to import the module from? Is it a Python shell or a file?noxdafox
@ noxdafox bothJoel Castro

2 Answers

1
votes

Are you sure you want to use this package? Looking at Pypi there seems to be no description and the source code of the project is nowhere to be found.

Looking at the package content, it's clear the setup.py is incomplete as well as the package itself.

The name to import is utilitybelt and not utility, yet you will encounter other importing issues as the package depends on other third party modules which are not listed in the setup.py.

-2
votes

Try to place the module's folder into the same directory where you have the script you want to execute. This way we could discard a folders' tree issue.