Comments (4)
I'm having this same issue now that I patched #14.
from fortran_magic.
Just for completeness, it's not OS X specific: I'm experiencing this on Linux too.
In [1]: %load_ext fortranmagic
/home/fdodev/miniconda3/envs/py34/lib/python3.4/site-packages/IPython/utils/path.py:264: UserWarning: get_ipython_cache_dir has moved to the IPython.paths module
warn("get_ipython_cache_dir has moved to the IPython.paths module")
In [2]: %%fortran
...: subroutine foo
...: end
...:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-f1fd164a03d9> in <module>()
----> 1 get_ipython().run_cell_magic('fortran', '', 'subroutine foo\nend\n')
/home/fdodev/miniconda3/envs/py34/lib/python3.4/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2291 magic_arg_s = self.var_expand(line, stack_depth)
2292 with self.builtin_trap:
-> 2293 result = fn(magic_arg_s, cell)
2294 return result
2295
/home/fdodev/miniconda3/envs/py34/lib/python3.4/site-packages/fortranmagic.py in fortran(self, line, cell)
/home/fdodev/miniconda3/envs/py34/lib/python3.4/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/home/fdodev/miniconda3/envs/py34/lib/python3.4/site-packages/fortranmagic.py in fortran(self, line, cell)
363
364 self._code_cache[key] = module_name
--> 365 module = imp.load_dynamic(module_name, module_path)
366 self._import_all(module, verbosity=args.verbosity)
367
ImportError: /home/fdodev/.cache/ipython/fortran/_fortran_magic_c4c4e6b95608557f83493040db65cd39.cpython-34m.so: cannot open shared object file: No such file or directory
These are the contents of the cache directory:
$ ls ~/.cache/ipython/fortran/ -l
total 4
-rw-r--r-- 1 fdodev fdo 19 2015-12-01 16:56 _fortran_magic_c4c4e6b95608557f83493040db65cd39.f90
from fortran_magic.
This consistently fails on Python 3 with IPython 2.x, 3.x and 4.x. On the contrary, on Python 2 works fine in all cases.
from fortran_magic.
Sorry for the noise, but I found out what's going on. This is actually a consequence of #9: when using Python 3, f2py
refers to the system binary and f2py3
should be used.
$ source activate py27
discarding /home/fdodev/miniconda3/bin from PATH
prepending /home/fdodev/miniconda3/envs/py27/bin to PATH
(py27)$ which f2py
/home/fdodev/miniconda3/envs/py27/bin/f2py
(py27)$ source deactivate
discarding /home/fdodev/miniconda3/envs/py27/bin from PATH
$ source activate py34
discarding /home/fdodev/miniconda3/bin from PATH
prepending /home/fdodev/miniconda3/envs/py34/bin to PATH
(py34)$ which f2py
/usr/bin/f2py
(py34)$ which f2py
f2py f2py3
(py34)fdodev@vmppgsdev:~> which f2py3
/home/fdodev/miniconda3/envs/py34/bin/f2py3
from fortran_magic.
Related Issues (20)
- intent(hide) HOT 1
- Bytes/string error on Python 3.5 and IPython 4.0
- how to pass intel64 ifort compiler option from jupyter notebook?
- IPython warning HOT 5
- UnicodeDecodeError when debugging fortran code
- Running the Example notebook fails HOT 1
- fortranmagic sometimes works, sometimes doesn't
- version 0.7?
- Does not work on python3 HOT 1
- Ipython and Javascript error
- Retrieve fortran source code HOT 4
- failed to load fortranmagic HOT 5
- Getting gfortran compiler error when running example HOT 6
- Number bugs HOT 2
- Incompatible with Numpy 1.26 & Python 3.12
- External library and optimisation flags HOT 15
- NameError with Python 3.3 HOT 1
- Problem running on Windows HOT 1
- fortranmagic should call f2py3 under Python 3 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fortran_magic.