ok...my mistake actually ... i was told this before ...

anyways...i tried running line by line and got to line #34     plt.figure()

it was executed without error but i got a python "something" in the mac dash 
(the icon is a circle with a helicopter rotor like something inside it)...this 
thing does not open when i click it

i don't want to proceed with the rest of the code before knowing this is what 
to be expected, is it?

________________________________
From: Christopher Hogan <ho...@simpetus.com>
Sent: Thursday, March 21, 2019 1:42 PM
To: Saeed younis
Cc: meep-discuss@ab-initio.mit.edu
Subject: Re: [Meep-discuss] still having problems installing

Sorry. I sent the message prematurely.

You have to type `python` at the terminal prompt, and then you will be in an 
interactive python session and can type the example code:

$ python
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>  import meep as mp
etc.


On Thu, Mar 21, 2019 at 8:40 AM Christopher Hogan 
<ho...@simpetus.com<mailto:ho...@simpetus.com>> wrote:
Hi,

You can't execute python code directly in a bash terminal. If you want an 
interactive python prompt, you have to type `python`

On Thu, Mar 21, 2019 at 8:38 AM Saeed younis 
<s....@live.com<mailto:s....@live.com>> wrote:
hi Chris,

i opened a fresh terminal and inserted

conda activate mp

to get the (mp) thing ...

then, trying to run the code in example:
meep<https://github.com/NanoComp/meep>/python<https://github.com/NanoComp/meep/tree/master/python>/examples<https://github.com/NanoComp/meep/tree/master/python/examples>/straight-waveguide.py

the code fails at the first line as:

Last login: Thu Mar 21 14:22:52 on console
g29younis:~ BakarooX$ conda activate mp
(mp) g29younis:~ BakarooX$ from __future__ import division
from: can't read /var/mail/__future__
(mp) g29younis:~ BakarooX$

why is this?

thnx

________________________________
From: Christopher Hogan <ho...@simpetus.com<mailto:ho...@simpetus.com>>
Sent: Thursday, March 21, 2019 12:27 PM
To: Saeed younis
Cc: meep-discuss@ab-initio.mit.edu<mailto:meep-discuss@ab-initio.mit.edu>
Subject: Re: [Meep-discuss] still having problems installing

Hi Saeed,

It appears to be working correctly.

ps: now that i ran an example, if i want to run a different example, can i run 
it strait away or should i do something before?

You can run different examples as you please. Each file is self-contained and 
will not affect the previous run.

Chris

On Thu, Mar 21, 2019 at 4:52 AM Saeed younis 
<s....@live.com<mailto:s....@live.com>> wrote:
hi Chris,

thnx for the assistance.

i have tried running the code pieces you provided in your email and here is 
what they prompted (below the line), could you please go over it and tell me if 
you spot anything out of the ordinary?

ps: now that i ran an example, if i want to run a different example, can i run 
it strait away or should i do something before?

thnx
__________________________________________________________

Last login: Thu Mar 21 10:34:00 on ttys000
g29younis:~ BakarooX$ conda activate base
(base) g29younis:~ BakarooX$
(base) g29younis:~ BakarooX$ conda create -n mp -c conda-forge pymeep

CondaValueError: prefix already exists: /miniconda3/envs/mp

(base) g29younis:~ BakarooX$ conda activate mp
(mp) g29younis:~ BakarooX$ echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc
(mp) g29younis:~ BakarooX$ git clone https://github.com/NanoComp/meep.git
Cloning into 'meep'...
remote: Enumerating objects: 14885, done.
remote: Total 14885 (delta 0), reused 0 (delta 0), pack-reused 14885
Receiving objects: 100% (14885/14885), 24.32 MiB | 5.96 MiB/s, done.
Resolving deltas: 100% (11459/11459), done.
(mp) g29younis:~ BakarooX$ cd meep
(mp) g29younis:meep BakarooX$ git checkout v1.8.0
Note: checking out 'v1.8.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at f33ee48 rename size to eliminate std::size conflict in C++17
(mp) g29younis:meep BakarooX$ cd python/examples
(mp) g29younis:examples BakarooX$ python 3rd-harm-1d.py
-----------
Initializing structure...
Working in 1D dimensions.
Computational cell is 0 x 0 x 100 with resolution 20
time for set_epsilon = 0.00117016 s
-----------
field decay(t = 100.05000000000001): 4.16910083472712e-12 / 
4.16910083472712e-12 = 1.0
field decay(t = 150.07500000000002): 1.0165409834939769e-08 / 
1.0165409834939769e-08 = 1.0
field decay(t = 200.10000000000002): 4.648720329217878e-06 / 
4.648720329217878e-06 = 1.0
field decay(t = 250.125): 0.0005182735319569587 / 0.0005182735319569587 = 1.0
field decay(t = 300.15000000000003): 0.013974697322011669 / 
0.013974697322011669 = 1.0
field decay(t = 350.175): 0.07995289002032732 / 0.07995289002032732 = 1.0
field decay(t = 400.20000000000005): 0.17867229467477655 / 0.17867229467477655 
= 1.0
field decay(t = 450.225): 0.23241654769547887 / 0.23241654769547887 = 1.0
field decay(t = 500.25): 0.18817882350661239 / 0.23241654769547887 = 
0.8096618996043756
field decay(t = 550.275): 0.014319414613175686 / 0.23241654769547887 = 
0.06161099437694745
field decay(t = 600.3000000000001): 0.0003754598154438489 / 0.23241654769547887 
= 0.0016154607714756648
field decay(t = 650.325): 2.9312708100424914e-06 / 0.23241654769547887 = 
1.261214332244172e-05
field decay(t = 700.35): 1.8599873539004834e-07 / 0.23241654769547887 = 
8.002818096831515e-07
run 0 finished at t = 700.35 (28014 timesteps)
harmonics:, 1, 1.0, 10.948940867211189, 0.1363383540846079

Elapsed run time = 1.0114 s

Field time usage:
     connecting chunks: 0.000177145 s
         time stepping: 0.416068 s
         communicating: 0.0331552 s
    Fourier transforming: 0.0204654 s
       everything else: 0.43869 s

(mp) g29younis:examples BakarooX$


________________________________
From: Christopher Hogan <ho...@simpetus.com<mailto:ho...@simpetus.com>>
Sent: Wednesday, March 20, 2019 1:45 PM
To: Saeed younis
Cc: meep-discuss@ab-initio.mit.edu<mailto:meep-discuss@ab-initio.mit.edu>
Subject: Re: [Meep-discuss] still having problems installing

Hi Saeed,

Please describe the issue you experienced with the conda package so I can help 
troubleshoot.

Here are the line-by-line instructions for getting a working Meep enviornment:

You already have miniconda installed, so first ensure you have the base 
environment active:

$ conda activate base

Next, create an environment called "mp" for your meep installation. Note that 
this environment will be completely isolated from everything else on your 
system, so you don't have to worry about conflicting installations.

$ conda create -n mp -c conda-forge pymeep

Activate the environment (this must be done each time you open a terminal).

$ conda activate mp

Now your terminal prompt will have a (mp) in front of it, indicating that the 
"mp" environment is active.

Next, as described in the documentation 
(https://meep.readthedocs.io/en/latest/Installation/#conda-packages) matplotlib 
requires an extra step on Mac. We must set the backend to TkAgg

$ echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc

Now we need the example scripts from the github repo. Clone the repo if you 
haven't already:

$ git clone https://github.com/NanoComp/meep.git
$ cd meep

We need to ensure that the examples correspond to the same version of meep that 
we installed (1.8.0).

$ git checkout v1.8.0
$ cd python/examples

Run some examples

$ python 3rd-harm-1d.py

If you experience any issues, please send detailed reports of the errors.

Chris





On Wed, Mar 20, 2019 at 5:34 AM Saeed younis 
<s....@live.com<mailto:s....@live.com>> wrote:
when i run brew doctor i get the following:

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /miniconda3/bin/python3.7-config
  /miniconda3/bin/python3.7m-config
  /miniconda3/bin/python3-config
  /miniconda3/bin/ncursesw6-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/ffi.h
  /usr/local/include/ffitarget.h

can this cause a problem? how to deal with that?

thnx


________________________________
From: meep-discuss 
<meep-discuss-boun...@ab-initio.mit.edu<mailto:meep-discuss-boun...@ab-initio.mit.edu>>
 on behalf of Saeed younis <s....@live.com<mailto:s....@live.com>>
Sent: Wednesday, March 20, 2019 10:27 AM
To: meep-discuss@ab-initio.mit.edu<mailto:meep-discuss@ab-initio.mit.edu>
Subject: [Meep-discuss] still having problems installing

hi,

i have tried the simple (conda) approach and the source code approach for 
installing meep...i do get some progress but at the end of the day plots are 
not generated even for the simplest of examples...i think i have done something 
wrong during installations or that the installations got mixed up somehow and 
cause an error

i would therefore want to completely remove everything that i have installed 
and start fresh with someone helping me through a step-by-step installation 
(and i really need line-by-line help)

would someone be welling to do that please?

could someone suggest a way to first make sure that i uninstall every last 
component of what i have installed?

i have installed Pyhton 3.7 and miniconda and followed john's instructions for 
the installations on sierra regarding installing several packages from through 
homebrew

i have a mac osx mojave 10.14.3

thnx in advance folks
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu<mailto:meep-discuss@ab-initio.mit.edu>
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to