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
Traceback (most recent call last):
File "/path/to/my/envs/q/bin/q", line 5, in<module>
from bin.q import run_standalone
ModuleNotFoundError: No module named 'bin'
/path/to/my/envs/q/bin/q is a script that is generated by the PYTHON -m pip install . -vv for the console script defined in setup.py. It looks like this...
Essentially the issue is that there is no package bin in the environment.
Solution
Adjust the setup.py as follows:
setup(
...
package_dir={"": "bin"}, # delete this line since its not neededpackages=setuptools.find_packages(),
# originally: packages=setuptools.find_packages(where="bin")
...
Additional considerations
One might want to reconsider renaming the bin folder to q (since it is quite weird to have a package named bin). Then import statements in test_suite.py and the console script in setup.py would have to be adjusted. I don't know what else could break thou.
The text was updated successfully, but these errors were encountered:
Sann5
linked a pull request
Jan 2, 2024
that will
close
this issue
TLDR
When installing
q
as a python package from the source, callingq
fails because thebin
package is not found (essentially because installation fails).Reproduce the error
Let's say I want to install
q
as a python package usingpip
and the providedsetup.py
. Namely,The last command gives an error:
/path/to/my/envs/q/bin/q
is a script that is generated by thePYTHON -m pip install . -vv
for the console script defined insetup.py
. It looks like this...Essentially the issue is that there is no package
bin
in the environment.Solution
Adjust the
setup.py
as follows:Additional considerations
One might want to reconsider renaming the
bin
folder toq
(since it is quite weird to have a package namedbin
). Then import statements intest_suite.py
and the console script insetup.py
would have to be adjusted. I don't know what else could break thou.The text was updated successfully, but these errors were encountered: