Skip to content
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

to_preferred brakes REPL #2041

Open
nopria opened this issue Jul 19, 2024 · 2 comments
Open

to_preferred brakes REPL #2041

nopria opened this issue Jul 19, 2024 · 2 comments

Comments

@nopria
Copy link

nopria commented Jul 19, 2024

I'm not able anymore (I was some months ago) to use "to_preferred" method.

Here are the steps followed to create a new environment: (I was not able to install mip through conda, so I had to install it with pip -- I'm in WIndows 11)

conda create -n appbis python
activate appbis
conda install conda-forge::pint
pip install mip --user

Getting into Python REPL:

>>> import pint
>>> um = pint.get_application_registry() # need this to avoid errors due to using different registries
>>> um.default_format = "~P"
>>>
>>> q=3*um.kN/um.cm
>>> q
<Quantity(3.0, 'kilonewton / centimeter')>
>>> q.to_preferred([um.kN,um.m])

and I'm kicked out from REPL without errors nor message of any type.

Here is the packages in environment appbis:

conda list
# packages in environment at C:\Users\UP\miniconda3\envs\appbis:
#
# Name                    Version                   Build  Channel
appdirs                   1.4.4              pyhd3eb1b0_0
bzip2                     1.0.8                h2bbff1b_6
ca-certificates           2024.7.2             haa95532_0
expat                     2.6.2                hd77b12b_0
flexcache                 0.3                pyhd8ed1ab_0    conda-forge
flexparser                0.3.1              pyhd8ed1ab_0    conda-forge
libffi                    3.4.4                hd77b12b_1
openssl                   3.0.14               h827c3e9_0
pint                      0.24.3             pyhd8ed1ab_0    conda-forge
pip                       24.0            py312haa95532_0
python                    3.12.4               h14ffc60_1
setuptools                69.5.1          py312haa95532_0
sqlite                    3.45.3               h2bbff1b_0
tk                        8.6.14               h0416ee5_0
typing-extensions         4.11.0          py312haa95532_0
typing_extensions         4.11.0          py312haa95532_0
tzdata                    2024a                h04d1e81_0
vc                        14.2                 h2eaa2aa_4
vs2015_runtime            14.29.30133          h43f2093_4
wheel                     0.43.0          py312haa95532_0
xz                        5.4.6                h8cc25b3_1
zlib                      1.2.13               h8cc25b3_1

pip list
Package           Version
----------------- -------
appdirs           1.4.4
cffi              1.15.0
flexcache         0.3
flexparser        0.3.1
mip               1.14.2
Pint              0.24.3
pip               24.0
pycparser         2.22
setuptools        69.5.1
typing_extensions 4.11.0
wheel             0.43.0
@andrewgsavage
Copy link
Collaborator

have you tried any other mip versions?

@nopria
Copy link
Author

nopria commented Aug 4, 2024

No, should I? Which version should I try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants