Skip to content

Software does not work on Win 10 #4

@ghost

Description

I'm running the code on Win 10 laptop and it does not work. (Even though you may read WIN11PC in the printout below my laptop is still Win10 level)

$ conda create --name smr-timcat2-py39 python=3.9
Retrieving notices: done
Channels:
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: C:\Users\memyself\AppData\Local\Anaconda3\envs\smr-timcat2-py39

  added / updated specs:
    - python=3.9


The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2025.2.25-haa95532_0
  openssl            pkgs/main/win-64::openssl-3.0.16-h3f729d1_0
  pip                pkgs/main/win-64::pip-25.0-py39haa95532_0
  python             pkgs/main/win-64::python-3.9.21-h8205438_1
  setuptools         pkgs/main/win-64::setuptools-75.8.0-py39haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.45.3-h2bbff1b_0
  tzdata             pkgs/main/noarch::tzdata-2025a-h04d1e81_0
  vc                 pkgs/main/win-64::vc-14.42-haa95532_4
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.42.34433-he0abc0d_4
  wheel              pkgs/main/win-64::wheel-0.45.1-py39haa95532_0


Proceed ([y]/n)?

Downloading and Extracting Packages: ...working... done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate smr-timcat2-py39
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base)
memyself@WIN11PC MINGW64 ~/ctyo/nuclear/TIMCAT2
$ conda activate smr-timcat2-py39
(smr-timcat2-py39)
memyself@WIN11PC MINGW64 ~/ctyo/nuclear/TIMCAT2
$ pip3 install .

Processing c:\users\memyself\ctyo\nuclear\timcat2
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting numpy (from TIMCAT==0.1.0)
  Using cached numpy-2.0.2-cp39-cp39-win_amd64.whl.metadata (59 kB)
Collecting pandas (from TIMCAT==0.1.0)
  Using cached pandas-2.2.3-cp39-cp39-win_amd64.whl.metadata (19 kB)
Collecting scipy (from TIMCAT==0.1.0)
  Using cached scipy-1.13.1-cp39-cp39-win_amd64.whl.metadata (60 kB)
Collecting matplotlib (from TIMCAT==0.1.0)
  Using cached matplotlib-3.9.4-cp39-cp39-win_amd64.whl.metadata (11 kB)
Collecting openpyxl==3.1.0 (from TIMCAT==0.1.0)
  Using cached openpyxl-3.1.0-py2.py3-none-any.whl.metadata (2.5 kB)
Collecting pytest (from TIMCAT==0.1.0)
  Using cached pytest-8.3.5-py3-none-any.whl.metadata (7.6 kB)
Collecting m2r2 (from TIMCAT==0.1.0)
  Using cached m2r2-0.3.3.post2-py3-none-any.whl.metadata (7.1 kB)
Collecting tqdm (from TIMCAT==0.1.0)
  Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Collecting rich (from TIMCAT==0.1.0)
  Using cached rich-13.9.4-py3-none-any.whl.metadata (18 kB)
Collecting bottleneck (from TIMCAT==0.1.0)
  Using cached Bottleneck-1.4.2-cp39-cp39-win_amd64.whl.metadata (7.9 kB)
Collecting astropy (from TIMCAT==0.1.0)
  Using cached astropy-6.0.1-cp39-cp39-win_amd64.whl.metadata (10 kB)
Collecting pint (from TIMCAT==0.1.0)
  Using cached Pint-0.24.4-py3-none-any.whl.metadata (8.5 kB)
Collecting et-xmlfile (from openpyxl==3.1.0->TIMCAT==0.1.0)
  Using cached et_xmlfile-2.0.0-py3-none-any.whl.metadata (2.7 kB)
Collecting numpy (from TIMCAT==0.1.0)
  Using cached numpy-1.26.4-cp39-cp39-win_amd64.whl.metadata (61 kB)
Collecting pyerfa>=2.0.1.1 (from astropy->TIMCAT==0.1.0)
  Using cached pyerfa-2.0.1.5-cp39-abi3-win_amd64.whl.metadata (5.9 kB)
Collecting astropy-iers-data>=0.2024.2.26.0.28.55 (from astropy->TIMCAT==0.1.0)
  Using cached astropy_iers_data-0.2025.3.17.0.34.53-py3-none-any.whl.metadata (5.1 kB)
Collecting PyYAML>=3.13 (from astropy->TIMCAT==0.1.0)
  Using cached PyYAML-6.0.2-cp39-cp39-win_amd64.whl.metadata (2.1 kB)
Collecting packaging>=19.0 (from astropy->TIMCAT==0.1.0)
  Using cached packaging-24.2-py3-none-any.whl.metadata (3.2 kB)
Collecting mistune==0.8.4 (from m2r2->TIMCAT==0.1.0)
  Using cached mistune-0.8.4-py2.py3-none-any.whl.metadata (8.5 kB)
Collecting docutils>=0.19 (from m2r2->TIMCAT==0.1.0)
  Using cached docutils-0.21.2-py3-none-any.whl.metadata (2.8 kB)
Collecting contourpy>=1.0.1 (from matplotlib->TIMCAT==0.1.0)
  Using cached contourpy-1.3.0-cp39-cp39-win_amd64.whl.metadata (5.4 kB)
Collecting cycler>=0.10 (from matplotlib->TIMCAT==0.1.0)
  Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib->TIMCAT==0.1.0)
  Using cached fonttools-4.56.0-cp39-cp39-win_amd64.whl.metadata (103 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib->TIMCAT==0.1.0)
  Using cached kiwisolver-1.4.7-cp39-cp39-win_amd64.whl.metadata (6.4 kB)
Collecting pillow>=8 (from matplotlib->TIMCAT==0.1.0)
  Using cached pillow-11.1.0-cp39-cp39-win_amd64.whl.metadata (9.3 kB)
Collecting pyparsing>=2.3.1 (from matplotlib->TIMCAT==0.1.0)
  Using cached pyparsing-3.2.1-py3-none-any.whl.metadata (5.0 kB)
Collecting python-dateutil>=2.7 (from matplotlib->TIMCAT==0.1.0)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting importlib-resources>=3.2.0 (from matplotlib->TIMCAT==0.1.0)
  Using cached importlib_resources-6.5.2-py3-none-any.whl.metadata (3.9 kB)
Collecting pytz>=2020.1 (from pandas->TIMCAT==0.1.0)
  Using cached pytz-2025.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas->TIMCAT==0.1.0)
  Using cached tzdata-2025.1-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting platformdirs>=2.1.0 (from pint->TIMCAT==0.1.0)
  Using cached platformdirs-4.3.6-py3-none-any.whl.metadata (11 kB)
Collecting typing-extensions>=4.0.0 (from pint->TIMCAT==0.1.0)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting flexcache>=0.3 (from pint->TIMCAT==0.1.0)
  Using cached flexcache-0.3-py3-none-any.whl.metadata (7.0 kB)
Collecting flexparser>=0.4 (from pint->TIMCAT==0.1.0)
  Using cached flexparser-0.4-py3-none-any.whl.metadata (18 kB)
Collecting colorama (from pytest->TIMCAT==0.1.0)
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting exceptiongroup>=1.0.0rc8 (from pytest->TIMCAT==0.1.0)
  Using cached exceptiongroup-1.2.2-py3-none-any.whl.metadata (6.6 kB)
Collecting iniconfig (from pytest->TIMCAT==0.1.0)
  Using cached iniconfig-2.0.0-py3-none-any.whl.metadata (2.6 kB)
Collecting pluggy<2,>=1.5 (from pytest->TIMCAT==0.1.0)
  Using cached pluggy-1.5.0-py3-none-any.whl.metadata (4.8 kB)
Collecting tomli>=1 (from pytest->TIMCAT==0.1.0)
  Using cached tomli-2.2.1-py3-none-any.whl.metadata (10 kB)
Collecting markdown-it-py>=2.2.0 (from rich->TIMCAT==0.1.0)
  Using cached markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich->TIMCAT==0.1.0)
  Using cached pygments-2.19.1-py3-none-any.whl.metadata (2.5 kB)
Collecting zipp>=3.1.0 (from importlib-resources>=3.2.0->matplotlib->TIMCAT==0.1.0)
  Using cached zipp-3.21.0-py3-none-any.whl.metadata (3.7 kB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich->TIMCAT==0.1.0)
  Using cached mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib->TIMCAT==0.1.0)
  Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Using cached openpyxl-3.1.0-py2.py3-none-any.whl (250 kB)
Using cached astropy-6.0.1-cp39-cp39-win_amd64.whl (6.4 MB)
Using cached numpy-1.26.4-cp39-cp39-win_amd64.whl (15.8 MB)
Using cached Bottleneck-1.4.2-cp39-cp39-win_amd64.whl (111 kB)
Using cached m2r2-0.3.3.post2-py3-none-any.whl (11 kB)
Using cached mistune-0.8.4-py2.py3-none-any.whl (16 kB)
Using cached matplotlib-3.9.4-cp39-cp39-win_amd64.whl (7.8 MB)
Using cached pandas-2.2.3-cp39-cp39-win_amd64.whl (11.6 MB)
Using cached Pint-0.24.4-py3-none-any.whl (302 kB)
Using cached pytest-8.3.5-py3-none-any.whl (343 kB)
Using cached rich-13.9.4-py3-none-any.whl (242 kB)
Using cached scipy-1.13.1-cp39-cp39-win_amd64.whl (46.2 MB)
Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)
Using cached astropy_iers_data-0.2025.3.17.0.34.53-py3-none-any.whl (1.9 MB)
Using cached contourpy-1.3.0-cp39-cp39-win_amd64.whl (211 kB)
Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
Using cached docutils-0.21.2-py3-none-any.whl (587 kB)
Using cached exceptiongroup-1.2.2-py3-none-any.whl (16 kB)
Using cached flexcache-0.3-py3-none-any.whl (13 kB)
Using cached flexparser-0.4-py3-none-any.whl (27 kB)
Using cached fonttools-4.56.0-cp39-cp39-win_amd64.whl (2.2 MB)
Using cached importlib_resources-6.5.2-py3-none-any.whl (37 kB)
Using cached kiwisolver-1.4.7-cp39-cp39-win_amd64.whl (55 kB)
Using cached markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
Using cached packaging-24.2-py3-none-any.whl (65 kB)
Using cached pillow-11.1.0-cp39-cp39-win_amd64.whl (2.6 MB)
Using cached platformdirs-4.3.6-py3-none-any.whl (18 kB)
Using cached pluggy-1.5.0-py3-none-any.whl (20 kB)
Using cached pyerfa-2.0.1.5-cp39-abi3-win_amd64.whl (349 kB)
Using cached pygments-2.19.1-py3-none-any.whl (1.2 MB)
Using cached pyparsing-3.2.1-py3-none-any.whl (107 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached pytz-2025.1-py2.py3-none-any.whl (507 kB)
Using cached PyYAML-6.0.2-cp39-cp39-win_amd64.whl (162 kB)
Using cached tomli-2.2.1-py3-none-any.whl (14 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Using cached tzdata-2025.1-py2.py3-none-any.whl (346 kB)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Using cached et_xmlfile-2.0.0-py3-none-any.whl (18 kB)
Using cached iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Using cached zipp-3.21.0-py3-none-any.whl (9.6 kB)
Building wheels for collected packages: TIMCAT
  Building wheel for TIMCAT (setup.py): started
  Building wheel for TIMCAT (setup.py): finished with status 'done'
  Created wheel for TIMCAT: filename=TIMCAT-0.1.0-py3-none-any.whl size=19658 sha256=71791fd3d603b21835c895242118336f120a36e338965e7a53314a2dea1be316
  Stored in directory: C:\Users\memyself\AppData\Local\Temp\1\pip-ephem-wheel-cache-9i4qugjv\wheels\08\3a\80\4adb222a0e3199d18abe0af0a5a9bd9f503633756f87be4dfb
Successfully built TIMCAT
Installing collected packages: pytz, mistune, zipp, tzdata, typing-extensions, tomli, six, PyYAML, pyparsing, pygments, pluggy, platformdirs, pillow, packaging, numpy, mdurl, kiwisolver, iniconfig, fonttools, exceptiongroup, et-xmlfile, docutils, cycler, colorama, astropy-iers-data, tqdm, scipy, python-dateutil, pytest, pyerfa, openpyxl, markdown-it-py, m2r2, importlib-resources, flexparser, flexcache, contourpy, bottleneck, rich, pint, pandas, matplotlib, astropy, TIMCAT
Successfully installed PyYAML-6.0.2 TIMCAT-0.1.0 astropy-6.0.1 astropy-iers-data-0.2025.3.17.0.34.53 bottleneck-1.4.2 colorama-0.4.6 contourpy-1.3.0 cycler-0.12.1 docutils-0.21.2 et-xmlfile-2.0.0 exceptiongroup-1.2.2 flexcache-0.3 flexparser-0.4 fonttools-4.56.0 importlib-resources-6.5.2 iniconfig-2.0.0 kiwisolver-1.4.7 m2r2-0.3.3.post2 markdown-it-py-3.0.0 matplotlib-3.9.4 mdurl-0.1.2 mistune-0.8.4 numpy-1.26.4 openpyxl-3.1.0 packaging-24.2 pandas-2.2.3 pillow-11.1.0 pint-0.24.4 platformdirs-4.3.6 pluggy-1.5.0 pyerfa-2.0.1.5 pygments-2.19.1 pyparsing-3.2.1 pytest-8.3.5 python-dateutil-2.9.0.post0 pytz-2025.1 rich-13.9.4 scipy-1.13.1 six-1.17.0 tomli-2.2.1 tqdm-4.67.1 typing-extensions-4.12.2 tzdata-2025.1 zipp-3.21.0
(smr-timcat2-py39)
memyself@WIN11PC MINGW64 ~/ctyo/nuclear/TIMCAT2
$ dir
LICENSE.txt                    building_template.csv   input_MaterialIndices.csv     inputfile_PWR12ME.xlsx  setup.py
PWR12_ME_inflated_reduced.csv  cost_sensitivity.py     input_scaling_exponents.xlsx  ncet
TIMCAT.egg-info                input_CostOverrun.csv   inputfile_LPSR.xlsx           readme.md
build                          input_LaborIndices.csv  inputfile_MMNC_12_77.xlsx     scheduler_table.csv
(smr-timcat2-py39)
memyself@WIN11PC MINGW64 ~/ctyo/nuclear/TIMCAT2
$ python cost_sensitivity.py
C:\Users\memyself\ctyo\nuclear\TIMCAT2\cost_sensitivity.py:56: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '[1 1 1 1 1 1 1 1 1 1 1 1]' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df_inputs.loc[aux, "Option " + str(option) + " Exponent"] = numbers
C:\Users\memyself\ctyo\nuclear\TIMCAT2\cost_sensitivity.py:56: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '[]' has dtype incompatible with float64, please explicitly cast to a compatible dtype first.
  df_inputs.loc[aux, "Option " + str(option) + " Exponent"] = numbers
C:\Users\memyself\ctyo\nuclear\TIMCAT2
Evaluating account 21: Structures & Improvements
        Account: A.212., Name: Reactor Building
Traceback (most recent call last):
  File "C:\Users\memyself\ctyo\nuclear\TIMCAT2\cost_sensitivity.py", line 369, in <module>
    run_ncet(
  File "C:\Users\memyself\ctyo\nuclear\TIMCAT2\cost_sensitivity.py", line 218, in run_ncet
    scaling_table, plant_characteristics = fill_scaling_table.fill_scaling_table(
  File "C:\Users\memyself\ctyo\nuclear\TIMCAT2\ncet\fill_scaling_table.py", line 127, in fill_scaling_table
    inside_acct = "A." + aux["Inside?"].split("A.")[1]
AttributeError: 'numpy.float64' object has no attribute 'split'
(smr-timcat2-py39)
memyself@WIN11PC MINGW64 ~/ctyo/nuclear/TIMCAT2
$

Adding requirement that pandas would be below 2.0 did not help - it only helped to progress further -- but then another issue surfaced


from setuptools import setup, find_packages

setup(
    name="TIMCAT",
    version="0.1.0",
    description="TIMCAT is used to calculate capital costs of nuclear power plants",
    url="https://github.com/mit-crpg/TIMCAT",
    author="",
    author_email="",
    license="NONE",
    packages=find_packages(),
    install_requires=[
        "numpy>=1.20.0,<1.25.0",
        "pandas>=1.3.0,<2.0.0",  # Keep below 2.0.0 to maintain append() compatibility
        "scipy>=1.7.0",
        "matplotlib>=3.4.0",
        "openpyxl>=3.0.0,<3.2.0",
        "pytest>=6.0.0",
        "m2r2>=0.3.0",
        "tqdm>=4.60.0",
        "rich>=10.0.0",
        "bottleneck>=1.3.0",
        "astropy>=4.2",
        "pint>=0.17",
    ],
    entry_points={"console_scripts": ["timechecker = TIMCAT.main:main"]},
    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",  # Change to appropriate license
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
    ],
    python_requires=">=3.9,<3.11",

Now it fails in module sum_account.py

import numpy as np
from os.path import join as pjoin
import pdb
import bottleneck as bn


def sum_accounts(df, idx_loc):
    print("Summing up root costs")
    df["Total Cost"] = (
        df["Site Labor Cost"] + df["Site Material Cost"] + df["Factory Equipment Cost"]
    )
    idx = df["Subcategories"] != 1
    accounts = df.index[idx].unique()

    headers = [
        "Factory Equipment Cost",
        "Site Material Cost",
        "Site Labor Cost",
        "Total Cost",
        "Site Labor Hours",
    ]
    summed_values = []
    for account in accounts:
        summed_values.append(df[headers].iloc[idx_loc[account]].to_numpy().sum(axis=0))
        # summed_values.append(bn.nansum(df[headers].iloc[idx_loc[account]].to_numpy(), axis=0))
    df.loc[accounts, headers] = summed_values

    "Sum up the total costs"
    df.at["A.1", "Factory Equipment Cost"] = (
        df.at["A.2", "Factory Equipment Cost"] + df.at["A.9", "Factory Equipment Cost"]
    )
    df.at["A.1", "Site Material Cost"] = (
        df.at["A.2", "Site Material Cost"] + df.at["A.9", "Site Material Cost"]
    )
    df.at["A.1", "Site Labor Hours"] = (
        df.at["A.2", "Site Labor Hours"] + df.at["A.9", "Site Labor Hours"]
    )
    df.at["A.1", "Site Labor Cost"] = (
        df.at["A.2", "Site Labor Cost"] + df.at["A.9", "Site Labor Cost"]
    )
    df.at["A.1", "Total Cost"] = df.at["A.2", "Total Cost"] + df.at["A.9", "Total Cost"]

    return df

with error

Exception has occurred: KeyError
'Factory Equipment Cost'
  File "C:\Users\kjurii\ctyo\nuclear\TIMCAT\ncet\sum_accounts.py", line 24, in sum_accounts
    summed_values.append(df[headers].iloc[idx_loc[account]].to_numpy().sum(axis=0))
  File "C:\Users\kjurii\ctyo\nuclear\TIMCAT\cost_sensitivity.py", line 283, in run_ncet
    dfNP = sum_accounts.sum_accounts(dfNP, idx_dict)
  File "C:\Users\kjurii\ctyo\nuclear\TIMCAT\cost_sensitivity.py", line 369, in <module>
    run_ncet(
KeyError: 'Factory Equipment Cost'

on line

        summed_values.append(df[headers].iloc[idx_loc[account]].to_numpy().sum(axis=0))

For some reason it has added the headers list to accounts.

It looks like there is some weird issue with software versions and it would be extremely helpful to learn package combo which has demonstratively worked on Win10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions