Attempting to update matplotlib to 1.4.1 (from 1.4.0) fails with
[...]
OPTIONAL LATEX DEPENDENCIES
dvipng: yes [version 1.14]
ghostscript: no
latex: yes [version 3.14159265]
pdftops: no
============================================================================
* The following required packages can not be built:
* freetype
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/matplotlib
Storing debug log for failure in /Users/Rax/Library/Logs/pip.log
and log details
Exception information:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Python/2.7/site-packages/pip/req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "/Library/Python/2.7/site-packages/pip/req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "/Library/Python/2.7/site-packages/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/matplotlib
Is this something related to my recent update to Yosemite (from Mavericks); or is it related to recent changes that seem to have been made to matplotlib's freetype dependences — or a bit of both? If so, what can I do to address it?
UPDATE: Same issue with 1.4.2.
I got to install matplotlib on OSX 10.10 reading https://github.com/matplotlib/matplotlib/pull/3713.
This is not a solution for pip users; just a way to install matplotlib on my mac waiting for a fix.
I downloaded sources for matplotlib 1.4.2,
changed line 960 in setupext.py as described in https://github.com/matplotlib/matplotlib/pull/3713/files :
'freetype2', 'ft2build.h',
becames
'freetype2', 'freetype2/ft2build.h'
and then compiled and installed with:
python setup.py build
python setup.py install
Related
I'm new to python. While installing matplotlibin command prompt, it's throwing below error
Command used: pip install matplotlib
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Prasanth\AppData\Local\Temp\pip-install-4wpq_qdh\matplotlib\
Below attached screenshot for the command prompt. Can someone please advise on how to solve this?
C:\Users\Prasanth>pip install matplotlib
Collecting matplotlib
Using cached https://files.pythonhosted.org/packages/be/06/81367951cc50695830482eacefdc8289c68770db166a4d4283e7eac22dee/matplotlib-3.2.0.tar.gz
Complete output from command python setup.py egg_info:
WARNING: The wheel package is not available.
Command "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\Scripts\python.exe C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pip-19.0.3-py3.8.egg\pip\_vendor\pep517\_in_process.py prepare_metadata_for_build_wheel C:\Users\Prasanth\AppData\Local\Temp\tmpauafujib" failed with error code 1 in C:\Users\Prasanth\AppData\Local\Temp\pip-wheel-ybn9_t9v\numpy
Traceback (most recent call last):
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Users\Prasanth\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\\Users\\Prasanth\\PycharmProjects\\Classess_Test\\venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Prasanth\\AppData\\Local\\Temp\\tmp482ludrm', '--quiet', 'numpy>=1.11']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Prasanth\AppData\Local\Temp\pip-install-4wpq_qdh\matplotlib\setup.py", line 232, in <module>
setup(
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\dist.py", line 684, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pkg_resources\__init__.py", line 781, in resolve
dist = best[req.key] = env.best_match(
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
return installer(requirement)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\dist.py", line 743, in fetch_build_egg
return fetch_build_egg(self, req)
File "C:\Users\Prasanth\PycharmProjects\Classess_Test\venv\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['C:\\Users\\Prasanth\\PycharmProjects\\Classess_Test\\venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\Prasanth\\AppData\\Local\\Temp\\tmp482ludrm', '--quiet', 'numpy>=1.11']' returned non-zero exit status 1.
Edit setup.cfg to change the build options; suppress output with --quiet.
BUILDING MATPLOTLIB
matplotlib: yes [3.2.0]
python: yes [3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 22:39:24) [MSC
v.1916 32 bit (Intel)]]
platform: yes [win32]
sample_data: yes [installing]
tests: no [skipping due to configuration]
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: no [Mac OS-X only]
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Prasanth\AppData\Local\Temp\pip-install-4wpq_qdh\matplotlib\
Most of the time this problem is because of old version of the setuptools. So you cand upgrade it with below code:
pip install --upgrade setuptools
and also try to open your CMD as an administrator.
You can also simply install your package by Conda. You just need to run one of the following:
conda install -c conda-forge matplotlib
conda install -c conda-forge/label/testing matplotlib
conda install -c conda-forge/label/testing/gcc7 matplotlib
conda install -c conda-forge/label/matplotlib_rc matplotlib
conda install -c conda-forge/label/gcc7 matplotlib
conda install -c conda-forge/label/broken matplotlib
conda install -c conda-forge/label/rc matplotlib
conda install -c conda-forge/label/cf201901 matplotlib
conda install -c conda-forge/label/broken-test matplotlib
For some reason, the specific version that I need to install manually cannot be accessed directly:
rpm -i ftp://195.220.108.108/linux/centos/7.1.1503/updates/x86_64/Packages/python-2.7.5-18.el7_1.1.x86_64.rpm
So tried a brand new installation of python, then tried updating and installing setup tools
yum -y update
yum -y install python-pip
pip install -U pip
pip install -U setuptools
pip install cassandra-driver
yum install patch
then tried
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
python ez_setup.py
pip install cassandra-driver
Full stacktrace
[root#d8174406546b cassandradump]# pip install cassandra-driver
Collecting cassandra-driver
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject
Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validat
ion failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. Thi
s prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/e
n/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached cassandra-driver-3.0.0.tar.gz
Complete output from command python setup.py egg_info:
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
unable to execute gcc: No such file or directory
Unable to find pgen, not compiling formal grammar.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-cP9FYQ/cassandra-driver/setup.py", line 375, in <module>
run_setup(None)
File "/tmp/pip-build-cP9FYQ/cassandra-driver/setup.py", line 373, in run_setup
**kw)
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 827, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1072, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1084, in obtain
return installer(requirement)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 640, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 670, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 853, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1081, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1069, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cP9FYQ/cassandra-driver
Typed enter too early, missed gcc library and got carried away by similar posts.
/tmp/easy_install-N19BCp/Cython-0.23.4/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
Unable to find pgen, not compiling formal grammar.
Traceback (most recent call last):
Then python-devel solved the problem.
install yum install python-devel
I am working inside docker so prefixed the 'RUN'. On real systems, you will need to use sudo in place of RUN. Sometimes, the pip is tool old. In my case it was 7.x so I also upgraded it. cython depends on python-devel
RUN pip install --upgrade pip
RUN yum -y install python-devel
RUN pip install cython
I have mac OSX 10.7.5 and I'm trying to install matplotlib, but I keep having issues.
Kristas-MacBook-Pro:lib Krista$ brew install matplotlib
==> Installing matplotlib dependency: numpy
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Downloading https://downloads.sourceforge.net/project/numpy/NumPy/1.8.1/nump
Already downloaded: /Library/Caches/Homebrew/numpy-1.8.1.tar.gz
==> Downloading https://pypi.python.org/packages/source/n/nose/nose-1.3.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/numpy--nose-1.3.1.tar.gz
==> python setup.py install --prefix=/usr/local/Cellar/numpy/1.8.1 --single-vers
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-python/issues
I'm not sure what to do? I tried brew doctor etc, as suggested by that website, but am just lost. Any help?
When trying to install distribute I get this error (and when trying to upgrade setuptools, I also get it)
Kristas-MacBook-Pro:lib Krista$ pip install distribute
Downloading/unpacking distribute
Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
Running setup.py (path:/private/var/folders/1z/b3f7sbv11gv2jvy113vy8m180000gn/T/pip_build_Krista/distribute/setup.py) egg_info for package distribute
Downloading/unpacking setuptools>=0.7 (from distribute)
Downloading setuptools-5.4.1-py2.py3-none-any.whl (528kB): 528kB downloaded
Installing collected packages: setuptools, distribute
Found existing installation: setuptools 0.6c12dev-r85381
Uninstalling setuptools:
Cleaning up...
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1431, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 598, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1836, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 295, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 293, in move
OSError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/easy_install.py'
Storing debug log for failure in /Users/Krista/Library/Logs/pip.log
You need to update setuptools (https://pypi.python.org/pypi/setuptools) or install Distribute (https://pypi.python.org/pypi/distribute/0.7.3)
I am trying to install python 2.7 and my usual libs.
Python 2.7 is installed (and the shell seems ok) - my config : win8.1 64bits
Setuptools, pip and virtualenv were installed after that
Microsoft Visual C++ 2008 redistribuable is also installed (to fix a [vcvarsall.bat] error), and I unistalled the basic 2010 Visual studio.
When I try to install my libs I get these popup errors:
installation on the virtual env = MSvcr100.dll missing
installation without env = python27.dll missing
Here is one sample trying to install psyopg2
writing manifest file 'pip-egg-info\psycopg2.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
Error:
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\xcpro\appdata\local\temp\pip_build_xcpro...
Command python setup.py egg_info failed with error code 1 in c:\users\xcpro\appdata\local\temp\pip_build_xcpro\psycopg2
Exception information:
Traceback (most recent call last):
File "C:\Users\xcpro\AppData\Roaming\Python\Python27\site-packages\pip-1.5.4-py2.7.egg\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\xcpro\AppData\Roaming\Python\Python27\site-packages\pip-1.5.4-py2.7.egg\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Users\xcpro\AppData\Roaming\Python\Python27\site-packages\pip-1.5.4-py2.7.egg\pip\req.py", line 1229, in prepare_files
req_to_install.run_eg
g_info()
File "C:\Users\xcpro\AppData\Roaming\Python\Python27\site-packages\pip-1.5.4-py2.7.egg\pip\req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\Users\xcpro\AppData\Roaming\Python\Python27\site-packages\pip-1.5.4-py2.7.egg\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in c:\users\xcpro\appdata\local\temp\pip_build_xcpro\psycopg2
I tried reinstallation, all possible things without success (except from downloading a dll, which seems to be risky...). Having spent 8hours in vain... any idea ?
[1]: http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
I am trying to install python bindings for osx fuse with pip on osx 10.8.5. I am running python 2.7.2. I am running fuse 2.6.1. When I run the pip install command I get this error. I do not know how to debug it.
akh$ pip install fuse-python
Downloading/unpacking fuse-python
Downloading fuse-python-0.2.tar.gz (53kB): 53kB downloaded
Running setup.py egg_info for package fuse-python
pkg-config unavailable, build terminated
Complete output from command python setup.py egg_info:
pkg-config unavailable, build terminated
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/hx/xb3zxftx6vlbd8nh1dbs6rc80000gn/T/pip_build_akh/fuse-python
Storing complete log in /Users/akh/Library/Logs/pip.log
Here is the tail of the log:
My Machine:Json akh$ tail 10 /Users/akh/Library/Logs/pip.log
tail: 10: No such file or directory
==> /Users/akh/Library/Logs/pip.log <==
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg/pip/commands/install.py", line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 1134, in prepare_files
req_to_install.run_egg_info()
File "/Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg/pip/req.py", line 259, in run_egg_info
command_desc='python setup.py egg_info')
File "/Library/Python/2.7/site-packages/pip-1.4.1-py2.7.egg/pip/util.py", line 670, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /private/var/folders/hx/xb3zxftx6vlbd8nh1dbs6rc80000gn/T/pip_build_abramhandler/fuse-python
I needed pck-config. Installing pck-config fixed the problem. These commands lead to a successful install.
brew install pkg-config
sudo pip install fuse-python