-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Unable to install pytensor as a package with pip install -e #947
Comments
Hi @tanish1729, this is concerning, thanks so much for reporting it! Let's try and diagnose this. Please try running import pytensor
print(pytensor.__file__) This should report the location of The next thing I'd look at is if your version of I hope it's something simple like this and not something more serious. |
Hi @tanish1729, thanks for the info! I suspect that Python could be getting confused with a conflicting directory named What's your current directory and Python search path? You can find them with from pathlib import Path
import sys
print(Path.cwd())
print(sys.path) |
I have a theory on what's going wrong. First I assume that your clone of PyTensor is in If you are running VS Code / Jupyter from If you're in VS Code, then you should open the folder I find this behavior from Python extremely frustrating. I'm very tempted to suggest the following, but I'm not sure if this potentially introduces new issues: Put the following contents into from pathlib import Path
likely_repo_root = Path(__file__).parent
raise RuntimeError(
f"Python is looking for PyTensor in {likely_repo_root}, but it's "
f"actually located in {likely_repo_root / 'pytensor'}. Probably "
f"you need to change your working directory from {Path.cwd()} "
f"to {likely_repo_root}."
) |
CC @aseyboldt because we was also facing this issue yesterday |
Turned this into a PR in #949 |
hey @maresb, yes it did start working fine after i went into the pytensor directory containing all the files. |
Yes, but in this case you're clobbering the As long as you've |
yes i tried that and it was working. i get what the problem is now. thanks! |
Describe the issue:
I installed pytensor using
pip install -e <path_to_my_fork>
but i keep running into errors after that and cant even do simple imports. Everything seems to be failing because ofReproducable code example:
Error message:
PyTensor version information:
Can't check version
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: