HelgeGehring / femwell

FEM mode solver for photonic waveguides
https://helgegehring.github.io/femwell/
GNU General Public License v3.0
112 stars 33 forks source link

Windows installation of femwell #94

Closed lukasc-ubc closed 8 months ago

lukasc-ubc commented 1 year ago

Hi @HelgeGehring

I am trying to install femwell on a Windows VM. I installed Python 3.11.5, VS Code, and the Python plugin.

In the terminal prompt for Python in VS Code, I tried pip install femwell, and get the following error:

image

I presume femwell should work on Windows? I was able to successfully pip install gmsh and pygmsh, so at least I have some of the requirements installed.

Thank you Lukas

lukasc-ubc commented 1 year ago

Please ignore for now. I am having trouble with the Python installation, which might be causing this.

HelgeGehring commented 1 year ago

I don't see a reason why it shouldn't work 🤔 and I think people also already use it in Windows 🤔 but I don't use Windows

@simbilod could you give it a try?

Maybe we have to adjust the packaging slightly?

simbilod commented 1 year ago

No issues on my end on Anaconda Prompt, which is the only way I would ever use Python directly on Windows. I otherwise always use Windows Subsystem for Linux for local development.

(base) C:\Users\simon>conda create -n femwell python=3.11
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\simon\gdsfactory\envs\femwell

  added / updated specs:
    - python=3.11

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pip-23.2.1                 |  py311haa95532_0         3.5 MB
    python-3.11.5              |       he1021f5_0        18.0 MB
    setuptools-68.0.0          |  py311haa95532_0         1.2 MB
    wheel-0.38.4               |  py311haa95532_0          96 KB
    ------------------------------------------------------------
                                           Total:        22.8 MB

The following NEW packages will be INSTALLED:

  bzip2              pkgs/main/win-64::bzip2-1.0.8-he774522_0
  ca-certificates    pkgs/main/win-64::ca-certificates-2023.08.22-haa95532_0
  libffi             pkgs/main/win-64::libffi-3.4.4-hd77b12b_0
  openssl            pkgs/main/win-64::openssl-3.0.10-h2bbff1b_2
  pip                pkgs/main/win-64::pip-23.2.1-py311haa95532_0
  python             pkgs/main/win-64::python-3.11.5-he1021f5_0
  setuptools         pkgs/main/win-64::setuptools-68.0.0-py311haa95532_0
  sqlite             pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
  tk                 pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
  tzdata             pkgs/main/noarch::tzdata-2023c-h04d1e81_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/win-64::wheel-0.38.4-py311haa95532_0
  xz                 pkgs/main/win-64::xz-5.4.2-h8cc25b3_0
  zlib               pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0

Proceed ([y]/n)?

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate femwell
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) C:\Users\simon>conda activate femwell

(femwell) C:\Users\simon>ls
'ls' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

(femwell) C:\Users\simon>pip install femwell
Collecting femwell
  Obtaining dependency information for femwell from https://files.pythonhosted.org/packages/7b/f4/39b00e59a9870fc63391dc9c6a2feaa093c0c9d986a16a76ac91a60cd152/femwell-0.1.8-py3-none-any.whl.metadata
  Downloading femwell-0.1.8-py3-none-any.whl.metadata (3.5 kB)
Collecting gmsh (from femwell)
  Using cached gmsh-4.11.1-py2.py3-none-win_amd64.whl (41.2 MB)
Collecting matplotlib (from femwell)
  Obtaining dependency information for matplotlib from https://files.pythonhosted.org/packages/2c/34/116e240ca10454ab2e57d0c00f6eb99cadf40724b679adacc265bb880bb8/matplotlib-3.7.3-cp311-cp311-win_amd64.whl.metadata
  Downloading matplotlib-3.7.3-cp311-cp311-win_amd64.whl.metadata (5.8 kB)
Collecting pygmsh (from femwell)
  Using cached pygmsh-7.1.17-py3-none-any.whl (45 kB)
Collecting scikit-fem>=8.1.0 (from femwell)
  Obtaining dependency information for scikit-fem>=8.1.0 from https://files.pythonhosted.org/packages/56/68/cea8c743ea33cbd1f5a76389d1cde2e69fbccbf1e3de21bcf9dcd165323f/scikit_fem-8.1.0-py3-none-any.whl.metadata
  Downloading scikit_fem-8.1.0-py3-none-any.whl.metadata (30 kB)
Collecting shapely>=2.0.0 (from femwell)
  Downloading shapely-2.0.1-cp311-cp311-win_amd64.whl (1.4 MB)
     ---------------------------------------- 1.4/1.4 MB 4.3 MB/s eta 0:00:00
Collecting numpy (from scikit-fem>=8.1.0->femwell)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/72/b2/02770e60c4e2f7e158d923ab0dea4e9f146a2dbf267fec6d8dc61d475689/numpy-1.25.2-cp311-cp311-win_amd64.whl.metadata
  Downloading numpy-1.25.2-cp311-cp311-win_amd64.whl.metadata (5.7 kB)
Collecting scipy (from scikit-fem>=8.1.0->femwell)
  Obtaining dependency information for scipy from https://files.pythonhosted.org/packages/06/15/e73734f9170b66c6a84a0bd7e03586e87e77404e2eb8e34749fc49fa43f7/scipy-1.11.2-cp311-cp311-win_amd64.whl.metadata
  Downloading scipy-1.11.2-cp311-cp311-win_amd64.whl.metadata (59 kB)
     ---------------------------------------- 59.1/59.1 kB ? eta 0:00:00
Collecting contourpy>=1.0.1 (from matplotlib->femwell)
  Obtaining dependency information for contourpy>=1.0.1 from https://files.pythonhosted.org/packages/16/09/989b982322439faa4bafffcd669e6f942b38fee897c2664c987bcd091dec/contourpy-1.1.0-cp311-cp311-win_amd64.whl.metadata
  Downloading contourpy-1.1.0-cp311-cp311-win_amd64.whl.metadata (5.7 kB)
Collecting cycler>=0.10 (from matplotlib->femwell)
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0 (from matplotlib->femwell)
  Obtaining dependency information for fonttools>=4.22.0 from https://files.pythonhosted.org/packages/95/b6/9a5133deb5838c4dbe3ea27e8dba123622aa5112d43a079e9587636b4faf/fonttools-4.42.1-cp311-cp311-win_amd64.whl.metadata
  Downloading fonttools-4.42.1-cp311-cp311-win_amd64.whl.metadata (154 kB)
     ---------------------------------------- 154.1/154.1 kB ? eta 0:00:00
Collecting kiwisolver>=1.0.1 (from matplotlib->femwell)
  Obtaining dependency information for kiwisolver>=1.0.1 from https://files.pythonhosted.org/packages/1e/37/d3c2d4ba2719059a0f12730947bbe1ad5ee8bff89e8c35319dcb2c9ddb4c/kiwisolver-1.4.5-cp311-cp311-win_amd64.whl.metadata
  Downloading kiwisolver-1.4.5-cp311-cp311-win_amd64.whl.metadata (6.5 kB)
Collecting packaging>=20.0 (from matplotlib->femwell)
  Downloading packaging-23.1-py3-none-any.whl (48 kB)
     ---------------------------------------- 48.9/48.9 kB ? eta 0:00:00
Collecting pillow>=6.2.0 (from matplotlib->femwell)
  Obtaining dependency information for pillow>=6.2.0 from https://files.pythonhosted.org/packages/66/d4/054e491f0880bf0119ee79cdc03264e01d5732e06c454da8c69b83a7c8f2/Pillow-10.0.0-cp311-cp311-win_amd64.whl.metadata
  Downloading Pillow-10.0.0-cp311-cp311-win_amd64.whl.metadata (9.6 kB)
Collecting pyparsing>=2.3.1 (from matplotlib->femwell)
  Obtaining dependency information for pyparsing>=2.3.1 from https://files.pythonhosted.org/packages/39/92/8486ede85fcc088f1b3dba4ce92dd29d126fd96b0008ea213167940a2475/pyparsing-3.1.1-py3-none-any.whl.metadata
  Downloading pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
Collecting python-dateutil>=2.7 (from matplotlib->femwell)
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting meshio<6,>=4.3.2 (from pygmsh->femwell)
  Using cached meshio-5.3.4-py3-none-any.whl (167 kB)
Collecting rich (from meshio<6,>=4.3.2->pygmsh->femwell)
  Obtaining dependency information for rich from https://files.pythonhosted.org/packages/8d/5f/21a93b2ec205f4b79853ff6e838e3c99064d5dbe85ec6b05967506f14af0/rich-13.5.2-py3-none-any.whl.metadata
  Downloading rich-13.5.2-py3-none-any.whl.metadata (18 kB)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib->femwell)
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting markdown-it-py>=2.2.0 (from rich->meshio<6,>=4.3.2->pygmsh->femwell)
  Obtaining dependency information for markdown-it-py>=2.2.0 from https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl.metadata
  Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich->meshio<6,>=4.3.2->pygmsh->femwell)
  Obtaining dependency information for pygments<3.0.0,>=2.13.0 from https://files.pythonhosted.org/packages/43/88/29adf0b44ba6ac85045e63734ae0997d3c58d8b1a91c914d240828d0d73d/Pygments-2.16.1-py3-none-any.whl.metadata
  Downloading Pygments-2.16.1-py3-none-any.whl.metadata (2.5 kB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich->meshio<6,>=4.3.2->pygmsh->femwell)
  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Downloading femwell-0.1.8-py3-none-any.whl (68 kB)
   ---------------------------------------- 68.4/68.4 kB ? eta 0:00:00
Downloading scikit_fem-8.1.0-py3-none-any.whl (160 kB)
   ---------------------------------------- 160.1/160.1 kB 9.4 MB/s eta 0:00:00
Downloading matplotlib-3.7.3-cp311-cp311-win_amd64.whl (7.5 MB)
   ---------------------------------------- 7.5/7.5 MB 7.7 MB/s eta 0:00:00
Downloading contourpy-1.1.0-cp311-cp311-win_amd64.whl (470 kB)
   ---------------------------------------- 470.9/470.9 kB 9.8 MB/s eta 0:00:00
Downloading fonttools-4.42.1-cp311-cp311-win_amd64.whl (2.1 MB)
   ---------------------------------------- 2.1/2.1 MB 9.0 MB/s eta 0:00:00
Downloading kiwisolver-1.4.5-cp311-cp311-win_amd64.whl (56 kB)
   ---------------------------------------- 56.1/56.1 kB 3.1 MB/s eta 0:00:00
Downloading numpy-1.25.2-cp311-cp311-win_amd64.whl (15.5 MB)
   ---------------------------------------- 15.5/15.5 MB 8.7 MB/s eta 0:00:00
Downloading Pillow-10.0.0-cp311-cp311-win_amd64.whl (2.5 MB)
   ---------------------------------------- 2.5/2.5 MB 10.0 MB/s eta 0:00:00
Downloading pyparsing-3.1.1-py3-none-any.whl (103 kB)
   ---------------------------------------- 103.1/103.1 kB ? eta 0:00:00
Downloading scipy-1.11.2-cp311-cp311-win_amd64.whl (44.0 MB)
   ---------------------------------------- 44.0/44.0 MB 8.3 MB/s eta 0:00:00
Downloading rich-13.5.2-py3-none-any.whl (239 kB)
   --------------------------------------- 239.7/239.7 kB 15.3 MB/s eta 0:00:00
Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
   ---------------------------------------- 87.5/87.5 kB ? eta 0:00:00
Downloading Pygments-2.16.1-py3-none-any.whl (1.2 MB)
   ---------------------------------------- 1.2/1.2 MB 10.6 MB/s eta 0:00:00
Installing collected packages: gmsh, six, pyparsing, pygments, pillow, packaging, numpy, mdurl, kiwisolver, fonttools, cycler, shapely, scipy, python-dateutil, markdown-it-py, contourpy, scikit-fem, rich, matplotlib, meshio, pygmsh, femwell
Successfully installed contourpy-1.1.0 cycler-0.11.0 femwell-0.1.8 fonttools-4.42.1 gmsh-4.11.1 kiwisolver-1.4.5 markdown-it-py-3.0.0 matplotlib-3.7.3 mdurl-0.1.2 meshio-5.3.4 numpy-1.25.2 packaging-23.1 pillow-10.0.0 pygments-2.16.1 pygmsh-7.1.17 pyparsing-3.1.1 python-dateutil-2.8.2 rich-13.5.2 scikit-fem-8.1.0 scipy-1.11.2 shapely-2.0.1 six-1.16.0

(femwell) C:\Users\simon>