Problem installing NetPyne in windows

111 views
Skip to first unread message

gira...@gmail.com

unread,
Jul 22, 2020, 6:24:16 PM7/22/20
to NetPyNE Q&A forum
I have Python 3.8.2 in the latest version of Windows 10.

Python works well, I have neuron installed via pip too.

However, if I just run the installation as recommended in the documentation:
python -m pip install netpyne
(with administration privileges on the terminal)

I run into the error message below. I also tried installing from git, but unsuccessfully.

It seems I'm missing the "freetype" and "png" package...

So I installed these packages:
pip install freetype-py pypng

But again, netpyne didn't pass this stage...


ERROR: Command errored out with exit status 1:
     command: 'C:\Program Files\Python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\girar\\AppData\\Local\\Temp\\pip-install-vugd9jpe\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\girar\\AppData\\Local\\Temp\\pip-install-vugd9jpe\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\girar\AppData\Local\Temp\pip-pip-egg-info-cuoyefp5'
         cwd: C:\Users\girar\AppData\Local\Temp\pip-install-vugd9jpe\matplotlib\
    Complete output (62 lines):
    ============================================================================
    Edit setup.cfg to change the build options

    BUILDING MATPLOTLIB
                matplotlib: yes [2.2.4]
                    python: yes [3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020,
                            23:03:10) [MSC v.1916 64 bit (AMD64)]]
                  platform: yes [win32]

    REQUIRED DEPENDENCIES AND EXTENSIONS
                     numpy: yes [version 1.18.3]
          install_requires: yes [handled by setuptools]
                    libagg: yes [pkg-config information for 'libagg' could not
                            be found. Using local copy.]
                  freetype: no  [The C/C++ header for freetype
                            (freetype2\ft2build.h) could not be found.  You may
                            need to install the development package.]
                       png: no  [The C/C++ header for png (png.h) could not be
                            found.  You may need to install the development
                            package.]
                     qhull: yes [pkg-config information for 'libqhull' could not
                            be found. Using local copy.]

    OPTIONAL SUBPACKAGES
               sample_data: yes [installing]
                  toolkits: yes [installing]
                     tests: no  [skipping due to configuration]
            toolkits_tests: no  [skipping due to configuration]

    OPTIONAL BACKEND EXTENSIONS
                    macosx: no  [Mac OS-X only]
                    qt5agg: yes [installing, Qt: 5.12.8, PyQt: 5.12.3; PySide2
                            not found]
                    qt4agg: no  [PySide not found; PyQt4 not found]
                   gtk3agg: no  [Requires pygobject to be installed.]
                     wxagg: no  [requires wxPython]
                       gtk: no  [Requires pygtk]
                       agg: yes [installing]
                     cairo: no  [cairocffi or pycairo not found]
                 windowing: yes [installing]

    OPTIONAL LATEX DEPENDENCIES
                    dvipng: yes [version Larsson]
               ghostscript: yes [version 9.25]
                     latex: no
                   pdftops: yes [version 0.60.1]

    OPTIONAL PACKAGE DATA
                      dlls: no  [skipping due to configuration]

    ============================================================================
                            * The following required packages can not be built:
                            * freetype, png
                            * Please check http://gnuwin32.sourceforge.net/packa
                            * ges/freetype.htm for instructions to install
                            * freetype
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Joe Graham

unread,
Jul 23, 2020, 7:29:29 PM7/23/20
to NetPyNE Q&A forum
Sorry for your difficulties.  We are looking into the issue and we'll let keep you updated.

Best wishes,
Joe

Joe Graham

unread,
Jul 23, 2020, 11:55:34 PM7/23/20
to NetPyNE Q&A forum
In the meantime, you could try using a virtual environment.  See here for more details about `virtualenv`: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/

Once you have `virtualenv` installed, you can switch to the directory where you're running NetPyNE and create a virtual environment (usually called `env`):

Windows:

py -m venv env


Mac OS/Linux:

python3 -m venv env


This will create a directory (`env` or whatever you called it), which will store your virtual environment.  Don't add this directory to a repository, as it's local to your system.

Now you need to activate `env` with:

Windows:

.\env\Scripts\activate


Mac OS/Linux:

source env/bin/activate


Now you're in the active virtual environment.  To get out, enter:

deactivate


To get back in, use the activate command above.

In the active environment, install `neuron` and `netpyne`:

pip install neuron

pip install netpyne


Then try running your NetPyNE code in your active virtual environment.


Reply all
Reply to author
Forward
0 new messages