simetenn / uncertainpy

Uncertainpy: a Python toolbox for uncertainty quantification and sensitivity analysis, tailored towards computational neuroscience.
http://uncertainpy.readthedocs.io
GNU General Public License v3.0
220 stars 50 forks source link

Difficult during installation #49

Open ireneanello opened 3 years ago

ireneanello commented 3 years ago

Hi, i'm trying to install uncertainpy through pip. I think there are some problems with the dependency with matplotlib, I'm now using matplotlib 3.4.2 with python 3.9. During the installation process appears this error message "ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cv/lqg257bn5l73k6zmpsjcrc8r0000gn/T/pip-install-efp71dav/matplotlib_00e40e036c024ec7813df13681fb71df/setup.py'"'"'; file='"'"'/private/var/folders/cv/lqg257bn5l73k6zmpsjcrc8r0000gn/T/pip-install-efp71dav/matplotlib_00e40e036c024ec7813df13681fb71df/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/cv/lqg257bn5l73k6zmpsjcrc8r0000gn/T/pip-record-6vfmmri0/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/matplotlib cwd: /private/var/folders/cv/lqg257bn5l73k6zmpsjcrc8r0000gn/T/pip-install-efp71dav/matplotlib_00e40e036c024ec7813df13681fb71df/"

Did someone have this problem too?

simetenn commented 3 years ago

Hi!

I do not get anything similar when I try to install using pip in a clean python environment. Do you get the same error if you try to install it in a clean environment?

ireneanello commented 3 years ago

Hi, thanks for your replay! :) Yes, I get the same error. I think it is something related to pkg-config, the message is "pkg-config is not installed. Matplotlib may not be able to find some of its dependencies". I'm not so much into coding, so I'm slowly trying to solve the problem. Do you have any tips?

simetenn commented 3 years ago

Unfortunately I do not have any good tips, as installation issues are always very dependent on the system you work on :/ In general I would start try to install matplotlib on its own, and continue down the path of potential dependencies for matplotlib that is not working and try to install those seperatly.

angelcortes18 commented 3 years ago

I am having the same issue on two separate machines. Installing the latest version of matplotlib is a breeze but the system gets hung up trying to install the older version that uncertainpy requires.

angelcortes18 commented 3 years ago

For what it's worth, I was able to resolve the issue by installing in a python venv instead of a conda env.

ireneanello commented 3 years ago

Hi, thank you all for your kind responses. At the end I had to install pkg-config and freetype with brew and then install uncertainpy in a virtual environment. Now it seems that everything works :)

simetenn commented 3 years ago

Great that you managed to get it to work! I have tested newest version of matplotlib and it seems to work. I have updated the requirements to allow matplotlib >=3. Unfortunatly you would (for now) have to install Uncertainpy from source and not through pip to get this to work, see https://github.com/simetenn/uncertainpy#installation. This is due to the continuous integration provider not working due to them moving to a new system, and the pip packages therefore not being built and published.