0

I'm trying to install FiPy on Python 3.6. and ran into trouble. I followed the installation instruction from the NIST website: https://www.ctcms.nist.gov/fipy/INSTALLATION.html

But at the last step pip install fipy I get an error that I don't understand:

(MYFIPYENV) >pip install fipy Collecting fipy Cache entry deserialization failed, entry ignored Cache entry deserialization failed, entry ignored
Downloading FiPy-3.1.3.tar.gz

Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\AppData\Local\Temp\pip-build-9xzf0bmv\fipy\setup.py",
line 61
    except ImportError, e:
                      ^
SyntaxError: invalid syntax

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

Command "python setup.py egg_info" failed with error code 1 in C:\Users\AppData\Local\Temp\pip-build-9xzf0bmv\fipy\ Cache entry deserialization failed, entry ignored

Could someone please tell me what's this error about and how to fix it?

To not dupplicate the question I tried following hints:

>pip upgrade 
>pip install --upgrade setuptools
>pip install ez_setup

Working on Windows 10. Thanks in advance!

2 Answers 2

1

FiPy is a Python 2 package.

Sign up to request clarification or add additional context in comments.

11 Comments

I converted the code yet however the installation failed. Tried your second hint and got: (base) C:\Users\>conda create --name MYFIPYENV --channel guyer --channel conda-forge fipy nomkl python=2.7 Solving environment: failed PackagesNotFoundError: The following packages are not available from current channels: - fipy - gmsh - fipy - pysparse - fipy - trilinos - fipy - nomkl - nomkl
Yes, I see that the conda installation does not work on Windows. I'll investigate. What does "I converted the code yet however the installation failed" mean? I just did a clean python 3.6 install on a Windows VM, ran 2to3, and installed. The code runs. What happened when you tried? What exact steps did you take?
C:\Users\\Diss_py\conda\envs\envfipy\Scripts>2to3 --write . RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No changes to .\2to3-script.py RefactoringTool: No changes to .\easy_install-script.py RefactoringTool: Refactored .\f2py.py --- .\f2py.py (original) +++ .\f2py.py (refactored)
@@ -1,6 +1,6 @@ #!C:/Users/Diss_py/conda/envs/envfipy\python.exe # See cens.ioc.ee/projects/f2py2e -from future import division, print_function import os import sys RefactoringTool: No changes to .\futurize-script.py RefactoringTool: No changes to .\idle-script.py RefactoringTool: No changes to .\mayavi2-script.py RefactoringTool: No changes to .\pasteurize-script.py RefactoringTool: No changes to .\pip-script.py RefactoringTool: No changes to .\pydoc-script.py RefactoringTool: No changes to .\pygmentize-script.py RefactoringTool: No changes to .\tvtk_doc-script.py
RefactoringTool: No changes to .\wheel-script.py RefactoringTool: Files that were modified: RefactoringTool: .\2to3-script.py RefactoringTool: .\easy_install-script.py RefactoringTool: .\f2py.py RefactoringTool: .\futurize-script.py RefactoringTool: .\idle-script.py RefactoringTool: .\mayavi2-script.py RefactoringTool: .\pasteurize-script.py RefactoringTool: .\pip-script.py RefactoringTool: .\pydoc-script.py RefactoringTool: .\pygmentize-script.py RefactoringTool: .\tvtk_doc-script.py RefactoringTool: .\wheel-script.py
|
1
except ImportError, e:

The syntax is for Python 2 only. Seems FiPi can be used only with Py2. Or at least can only be installed with Py2 using pip. Try other installation methods.

3 Comments

Do you have any suggestions? I'm kind of lost.
Use conda for installation. Or use Python 2. Or update the code to be Py3-compatible. Or ask the authors to update code.
The authors have been asked, and are not unsympathetic, but it's not been a priority because none of the good (3rd party) solvers work on Py3k and it's so trivial to run python 2.7 and 3.6 side-by-side with conda.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.