trying to import the module

240 views
Skip to first unread message

Hilary

unread,
Aug 7, 2017, 10:12:20 AM8/7/17
to phreeqpy-users
Hello, From python using Cygwin (Windows machine), I am trying to import the phreeqpy module:

 import phreeqpy.iphreeqc.phreeqc_dll as phreeqc_mod

and I get:
ModuleNotFoundError: No module named 'phreeqpy.iphreeqc.phreeqc"

From the phreeqpy documentation, I thought perhaps I needed to "download an appropriate library: from ftp://brrftp.cr.usgs.gov/pub/charlton/iphreeqc/

Clicking that link, the most recent README was dated 5/10/2017:
ftp://brrftp.cr.usgs.gov/pub/charlton/iphreeqc/README.IPhreeqc.12704.TXT
 
and it says:

C. Installing Windows COM versions

-----------------------------------------------------------------------------------

       

        For 64-bit computers, download both 32- and 64-bit versions:

       

        IPhreeqcCOM-3.3.12-12704-win32.msi 

        IPhreeqcCOM-3.3.12-12704-x64.msi

Double click on each .msi file and follow the instructions.

       

        IPhreeqcCOM is installed and ready to use for 32- and 64-bit applications.

       

        To test the COM, you can open the Excel file and run the "runphreeqc" macro

        (view->macros):

        C:\Program Files\USGS\IPhreeqcCOM 3.2.0-9755\examples\com\excel\runphreeqc.xls

 

 

So I uninstalled the iphreeqc that I had, and installed these two. This did not help. The manual goes on…

 

        In general, to compile the IPhreeqc library, you will need:

 

               (a) CMake (build process manager)

               (b) a C++ compiler,

               (c) familiarity with the compiler and the Windows operating system.

I feel like I'm falling down a rabbit hole and not getting closer to the goal. Any advice?

Patel Ravi

unread,
Aug 7, 2017, 10:42:43 AM8/7/17
to phreeqp...@googlegroups.com
Dear Hilary,
Recently I rehashed PhreeqPy to IPhreeqcPy which directly complies IPhreeqc and creates API main code is same as PhreeqPy but I have changed the naming conventions back to one used in IPhreeqc manual and added some more functionality. Here is how to install IPhreeqcPy (https://raviapatel.bitbucket.io/IPhreeqcPy/install.html). In case you have any problems let me know hope this works!

--
You received this message because you are subscribed to the Google Groups ""phreeqpy-users" group.
To post to this group, send email to phreeqpy-users@googlegroups.com.
To unsubscribe from this group, send email to phreeqpy-users+unsubscribe@googlegroups.com.
For more options, visit this group at https://groups.google.com/d/forum/phreeqpy-users?hl=en.
 
More information about PhreeqPy can be found at http://www.phreeqpy.com.
---
You received this message because you are subscribed to the Google Groups "phreeqpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phreeqpy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hilary

unread,
Aug 7, 2017, 10:57:04 AM8/7/17
to phreeqpy-users
Ravi- Thank you so much for your rapid reply. I'll follow those steps and let you know if I have further questions. I really appreciate your help. Hilary

Hilary

unread,
Aug 7, 2017, 11:04:45 AM8/7/17
to phreeqpy-users
Hi Ravi, For cmake download there's a version under Platform, then under Binary Distributions there are two for windows 64 bit. Do I just download the first one, i.e., under Platform? Thanks- Hilary

Patel Ravi

unread,
Aug 7, 2017, 11:25:14 AM8/7/17
to phreeqp...@googlegroups.com
Hi Hilary,
Just download .msi (the binary one) that works fine
regards
Ravi

--

Patel Ravi

unread,
Aug 7, 2017, 11:28:31 AM8/7/17
to phreeqp...@googlegroups.com
Hi 
I missed the first part of your first email. If you are using cygwin then probably you should do the way its done in linux installer my linux guide to install IPhreeqcPy. Personally I have never tried it with cygwin. But if you are just using it for calling in pure python codes I just suggest to install it in windows and directly use it without cygwin
good luck
regards
Ravi

To post to this group, send email to phreeqp...@googlegroups.com.

Hilary

unread,
Aug 7, 2017, 12:18:57 PM8/7/17
to phreeqpy-users
Hm, I'm trying to go through cygwin because my objective is to follow someone's instructions for using python to do parameter estimations for phreeqc, and their instructions stipulate that to use their code in windows you need to use cygwin. I can try using the linux installer, but I'm worried that by forgoing cygwin may cause problems using the parameter estimation codes.

When I follow your posted instructions in windows command prompt:
pip install IPhreeqcPy

I get: 'pip' is not recognized as an internal or external command, operable program or batch file.

I tried: python -m pip install -- user phreeqpy
and got: 'python' is not recognized as an internal (etc)

Going back to Cygwin, putting in:
pip install IPhreeqcPy

I get: -bash: pip: command not found

So again in Cygwin I tried:
$ python -m pip install --user IPhreeqcPy
and got:
Collecting IPhreeqcPy
  Downloading IPhreeqcPy-v1.0.0.tar.gz (15.8MB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Cygwin\tmp\pip-build-9uqz53zl\IPhreeqcPy\setup.py", line 40
        print os.getcwd()
               ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Cygwin\tmp\pip-build-9uqz53zl\IPhreeqcPy\

To unsubscribe from this group, send email to phreeqpy-user...@googlegroups.com.

For more options, visit this group at https://groups.google.com/d/forum/phreeqpy-users?hl=en.
 
More information about PhreeqPy can be found at http://www.phreeqpy.com.
---
You received this message because you are subscribed to the Google Groups "phreeqpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phreeqpy-user...@googlegroups.com.

Patel Ravi

unread,
Aug 7, 2017, 3:30:06 PM8/7/17
to phreeqp...@googlegroups.com
Hmmm you need to install pip I am not sure how you installed python.maybe you should use standard distribution of python which has collection of all packages such as python xy or anaconda then you don't have such problems. You don't need to use cygwin to run iphreeqc with my instructions
Regards
Ravi

To post to this group, send email to phreeqpy-users@googlegroups.com.
To unsubscribe from this group, send email to phreeqpy-users+unsubscribe@googlegroups.com.

For more options, visit this group at https://groups.google.com/d/forum/phreeqpy-users?hl=en.
 
More information about PhreeqPy can be found at http://www.phreeqpy.com.
---
You received this message because you are subscribed to the Google Groups "phreeqpy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phreeqpy-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages