uncertainpy icon indicating copy to clipboard operation
uncertainpy copied to clipboard

Difficult during installation

Open ireneanello opened this issue 4 years ago • 7 comments

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?

ireneanello avatar May 08 '21 10:05 ireneanello

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?

simetenn avatar May 14 '21 12:05 simetenn

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?

ireneanello avatar May 21 '21 14:05 ireneanello

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.

simetenn avatar Jun 12 '21 11:06 simetenn

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 avatar Jun 15 '21 17:06 angelcortes18

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

angelcortes18 avatar Jun 17 '21 15:06 angelcortes18

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 :)

ireneanello avatar Jun 18 '21 18:06 ireneanello

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.

simetenn avatar Jun 18 '21 19:06 simetenn