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

No module named " No module named 'hvac.heat_exchanger.recuperator'" #9

Open
MechEngr opened this issue Aug 14, 2024 · 2 comments
Open

Comments

@MechEngr
Copy link

Great library, thank you for sharing! I was able to install the python package, but when I can the example code from air cooling coil example 1, I get the error about the heat_exchanger.recuperator module not being available.

Could you please help?

Code snippet below:

import warnings
from hvac import Quantity
from hvac.fluids import HumidAir, Fluid, CoolPropWarning
from hvac.heat_exchanger.recuperator.fintube.continuous_fin import (
PlainFinTubeAirToWaterCounterFlowHeatExchanger
)

warnings.filterwarnings('ignore', category=CoolPropWarning)

Q_ = Quantity

@TomLXXVI
Copy link
Owner

I've tried to reproduce your problem, but I haven't encountered any problem. Below are the steps that I took. You need the program Poetry installed on your computer to set up the project's virtual environment. The Python IDE I use, is PyCharm Professional (version 2024.2).

  1. From the project main page on GitHub, download the project in a ZIP file on your computer (see the green button "<> Code"). The ZIP file will be named "python-hvac-master.zip".
  2. Unzip the ZIP-file "python-hvac-master.zip" on your computer. This should create a folder "python-hvac-master" on your computer, within it another folder which is also called "python-hvac-master".
  3. Copy (or cut) this last folder into your own projects directory.
  4. Open the project folder "python-hvac-master" in your projects directory with PyCharm. Normally, PyCharm will automatically detect that there is a "pyproject.toml" file present in the project folder and it will propose to setup the Poetry virtual environment for you.
  5. Accept this and when PyCharm is ready, you should be able to run the Python scripts and Jupyter notebooks in the projects docs/examples-folder.

Another possibility (after unzipping), that doesn't need Poetry (or PyCharm), could be to only copy the wheel-file "python_hvac-0.1.2-py3-none-any.whl" (i.e. the most recent version) from the "dist" folder. Create your own new project folder with an associated virtual environment and then copy-paste the wheel-file into this project folder. After activating the associated virtual environment, run "pip install python_hvac-0.1.2-py3-none-any.whl" in this folder. This will install all the dependencies in the virtual environment. After that, you can copy-paste the examples into your project folder. Normally, they should run (at least they do on my computer).

@MechEngr
Copy link
Author

MechEngr commented Aug 16, 2024 via email

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