Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Trying alternative installation via FreeBSD #357

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

Closed
yurivict opened this issue Jun 21, 2023 · 7 comments
Closed

Trying alternative installation via FreeBSD #357

yurivict opened this issue Jun 21, 2023 · 7 comments
Labels
installation question Further information is requested

Comments

@yurivict
Copy link

Describe the issue:

$ python3.9 x.py
Traceback (most recent call last):
  File "/usr/ports/math/py-pytensor/x.py", line 1, in <module>
    import pytensor
  File "/usr/local/lib/python3.9/site-packages/pytensor/__init__.py", line 119, in <module>
    from pytensor import scalar, tensor
  File "/usr/local/lib/python3.9/site-packages/pytensor/tensor/__init__.py", line 112, in <module>
    import pytensor.tensor.rewriting
  File "/usr/local/lib/python3.9/site-packages/pytensor/tensor/rewriting/__init__.py", line 11, in <module>
    import pytensor.tensor.rewriting.math
  File "/usr/local/lib/python3.9/site-packages/pytensor/tensor/rewriting/math.py", line 2674, in <module>
    local_one_plus_erf = PatternNodeRewriter(
  File "/usr/local/lib/python3.9/site-packages/pytensor/graph/rewriting/basic.py", line 1570, in __init__
    from pytensor.graph.rewriting.unify import convert_strs_to_vars
  File "/usr/local/lib/python3.9/site-packages/pytensor/graph/rewriting/unify.py", line 19, in <module>
    from etuples import apply, etuple, etuplize
  File "/usr/local/lib/python3.9/site-packages/etuples/__init__.py", line 2, in <module>
    from .core import etuple
  File "/usr/local/lib/python3.9/site-packages/etuples/core.py", line 343, in <module>
    def etuple(*args, **kwargs):
  File "/usr/local/lib/python3.9/site-packages/multipledispatch/core.py", line 68, in _
    dispatcher.add(types, func, on_ambiguity=on_ambiguity)
  File "/usr/local/lib/python3.9/site-packages/multipledispatch/dispatcher.py", line 133, in add
    raise TypeError("Tried to dispatch on non-type: %s\n"
TypeError: Tried to dispatch on non-type: [<class 'object'>]
In signature: <[<class 'object'>]>
In function: etuple

Reproducable code example:

See README.

Error message:

see above

PyTensor version information:

2.12.3

Context for the issue:

Python-3.9
FreeBSD 13.2

@yurivict yurivict added the bug Something isn't working label Jun 21, 2023
@ricardoV94
Copy link
Member

Sounds like an installation issue on your end. How did you install?

@yurivict
Copy link
Author

yurivict commented Jun 21, 2023

It is installed using the FreeBSD port system.

@ricardoV94
Copy link
Member

I am not sure what that is. Even if it's not a solution can you try to pip install to confirm it's an installation issue and not a problem with your system.

I am pretty sure it would work with pip install, that's why I ask.

@yurivict
Copy link
Author

I am pretty sure it would work with pip install, that's why I ask.

pip install can install packages, but it doesn't seem to be able to run tests.


etuples seems to be broken. The error is the same as pythological/etuples#24

@ricardoV94
Copy link
Member

The test files aren't bundled with the pip package. Could you explain what you're trying to do exactly?

We have little resources to support alternative forms of installation. Our tests are designed for developers and they can be run if you clone the repo and install all dev requirements.

You can check the exact steps we use in the CI:

@yurivict
Copy link
Author

yurivict commented Jun 22, 2023

Could you explain what you're trying to do exactly?

I am trying to make sure that the package runs after it was installed. Tests serve this purpose. I do this as part of maintaining/updating of the FreeBSD port.

If tests fail for whatever reason, this installation is faulty.

Maybe Python doesn't have such ability at the pip level, but the FreeBSD ports framework does support and encourage to run tests as part of the port update process.

I am trying to figure out what is wrong in this case.

@ricardoV94
Copy link
Member

It might help if you could provide reproducible installation steps because I have no idea how you're trying to install.

Having said that, keep in mind there's little interest in our side in supporting alternative forms of installation other than pip and conda due to limited developer resources.

Our supported installation venues don't ship tests, because those are very thorough development oriented tests (it would take hours to run them locally). If you want a quick smoke test, then running the README might be good enough.

Have you tried to do this with pip installed PyTensor already?

PS: I am going to close your other issue because they all seem related to the unnoficial way you're trying to install the package.

@ricardoV94 ricardoV94 changed the title BUG: The example from the README fails: TypeError: Tried to dispatch on non-type: [<class 'object'>] Trying alternative installation via FreeBSD Jun 23, 2023
@ricardoV94 ricardoV94 added question Further information is requested installation and removed bug Something isn't working labels Jun 23, 2023
@pymc-devs pymc-devs locked and limited conversation to collaborators Jun 23, 2023
@ricardoV94 ricardoV94 converted this issue into discussion #358 Jun 23, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
installation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants