CryPTSys / PharmaPy

A numerical platform for the digital design of pharmaceutical processes
Other
23 stars 14 forks source link

Installation Issues #89

Closed cameronbrown100 closed 1 year ago

cameronbrown100 commented 1 year ago

When installing on Windows executing InstallOnWindows.bat ends with the following error and the pharmapy environment isn't created.

[1/1] Cythonizing assimulo\solvers\euler.pyx C:\ProgramData\Anaconda3\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\\AppData\Local\Temp\easy_install-s9rd0icw\Assimulo-3.0\assimulo\solvers\euler.pyx tree = Parsing.p_module(s, pxd, full_module_name) non-existing path in '': 'assimulo\thirdparty\hairer\dopri5.pyf' non-existing path in '': 'assimulo\thirdparty\hairer\rodas_decsol.pyf' non-existing path in '': 'assimulo\thirdparty\hairer\radau_decsol.pyf' non-existing path in '': 'assimulo\thirdparty\hairer\radar5.pyf' non-existing path in '': 'assimulo\thirdparty\odepack\odepack.pyf' non-existing path in '': 'assimulo\thirdparty\odassl\odassl.pyf' Could not find Blas or Lapack, disabling support for the solver GLIMDA. target build\src.win-amd64-3.9\assimulo\thirdparty\hairer\dopri5module.c does not exist: Assuming dopri5module.c was generated with "build_src --inplace" command. error: Setup script exited with error: 'assimulo\thirdparty\hairer\dopri5module.c' missing Done!

djlaky commented 1 year ago

Could you let me know what led up to this issue?

  1. Did you successfully install miniconda/anaconda3?
  2. What application did you run the InstallOnWindows.bat from (i.e., anaconda powershell, command prompt, etc...)?
cameronbrown100 commented 1 year ago
  1. Anaconda3 was already installed and in use for other projects.
  2. bat file was run form anaconda powershell with admin rights.

I managed to work around using Ubuntu in WSL doing the following:

  1. Create new environment

  2. Install packages individually

    • cyipopt (from conda forge channel)
    • numpy
    • matplotlib
    • pandas
    • assimulo (from conda forge channel)
    • pyomo (from conda forge channel)
    • scipy
    • Cython
  3. Run conda install -c conda-forge --file requirements.txt

  4. Run python setup.py develop

  5. Add the following to the start of scripts: import os os.environ['NUMPY_EXPERIMENTAL_DTYPE_API'] = '1'

This seems to work in Python from the terminal and Jupyter Notebook. However, the examples call path_phys = '../data/compound_database.json' which doesn't seem to be included in the repository.

djlaky commented 1 year ago

Thanks for the update. I'm closing this issue as resolved for now. Updating the .bat file and uploading the compounds_database.json file shortly.