You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By following the instructions here, the pip install operation is successful but the package installed cannot be imported. The issue was reported here in the PR #851 but the solution does not resolve the issue.
Tried putting setup.py under the root of the repository, like the way that NLP and CV repositories do, there was another error as follows
Installing collected packages: reco-utils
Found existing installation: reco-utils 2019.9
Uninstalling reco-utils-2019.9:
Successfully uninstalled reco-utils-2019.9
Running setup.py develop for reco-utils
ERROR: Command errored out with exit status 1:
command: /data/anaconda/envs/graph_base/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/home/zhle/notebooks/recommenders/setup.py'"'"'; __file__='"'"'/data/home/zhle/notebooks/recommenders/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
cwd: /data/home/zhle/notebooks/recommenders/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/data/home/zhle/notebooks/recommenders/setup.py", line 8, in <module>
VERSION = __import__("__init__").VERSION
ModuleNotFoundError: No module named '__init__'
----------------------------------------
Rolling back uninstall of reco-utils
Moving to /data/anaconda/envs/graph_base/lib/python3.6/site-packages/reco-utils.egg-link
from /tmp/pip-uninstall-t38y7r7p/reco-utils.egg-link
ERROR: Command errored out with exit status 1: /data/anaconda/envs/graph_base/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/home/zhle/notebooks/recommenders/setup.py'"'"'; __file__='"'"'/data/home/zhle/notebooks/recommenders/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Comment the line of VERSION = __import__("__init__").VERSION it worked, and importing of reco_utils is successful.
In which platform does it happen?
The error can be replicated on a DSVM by following the pip install instruction in here.
How do we replicate the issue?
Same as above
Expected behavior (i.e. solution)
The reco_utils should be imported without issue after pip installation.
Other Comments
The text was updated successfully, but these errors were encountered:
@gramhagen not sure if it is something to do with subdirectory functionality of pip install from github, but putting the setup.py under root directory of the repo solves the problem.
Description
By following the instructions here, the pip install operation is successful but the package installed cannot be imported. The issue was reported here in the PR #851 but the solution does not resolve the issue.
Tried putting
setup.py
under the root of the repository, like the way that NLP and CV repositories do, there was another error as followsComment the line of
VERSION = __import__("__init__").VERSION
it worked, and importing ofreco_utils
is successful.In which platform does it happen?
The error can be replicated on a DSVM by following the pip install instruction in here.
How do we replicate the issue?
Same as above
Expected behavior (i.e. solution)
The
reco_utils
should be imported without issue after pip installation.Other Comments
The text was updated successfully, but these errors were encountered: