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
Related
I am getting syntax error ERROR: Command errored out with exit status 1 ... while trying to install Pyinstaller under Wine on Kali Linux in a virtual environment
I'm getting an error as follows:
┌──(root㉿kali)-[~/.wine/drive_c/Python27/Scripts]
└─# wine ~/.wine/drive_c/Python27/python.exe -m pip install pyinstaller
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrt
Collecting pyinstaller
Using cached https://files.pythonhosted.org/packages/9e/ed/fbdad7f5d8f794c901076b814b8z
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Python27\python.exe' 'C:\Python27\lib\site-packages\pip\_vendor\pep517\_'
cwd: c:\users\root\temp\pip-install-87e3zr\pyinstaller
Complete output (19 lines):
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in>
main()
File "C:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, inn
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Python27\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in l
return hook(config_settings)
File "c:\users\root\temp\pip-build-env-fbjbxm\overlay\Lib\site-packages\setuptools\bl
return self._get_build_requires(config_settings, requirements=['wheel'])
File "c:\users\root\temp\pip-build-env-fbjbxm\overlay\Lib\site-packages\setuptools\bs
self.run_setup()
File "c:\users\root\temp\pip-build-env-fbjbxm\overlay\Lib\site-packages\setuptools\bp
self).run_setup(setup_script=setup_script)
File "c:\users\root\temp\pip-build-env-fbjbxm\overlay\Lib\site-packages\setuptools\bp
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 63
file=sys.stderr)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Python27\python.exe' 'C:\Python27\lib.
WARNING: You are using pip version 19.2.3, however version 20.3.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have python2 version 2.7.18 and python version 3.9.10 installed and pip 22.1.2 from /usr/local/lib/python3.9/dist-packages/pip. I have tried uninstalling and reinstalling Python, Wine but the error doesn't go away.
The latest PyInstaller version for Python2.7 is 3.6.
So you need to tell pip which PyInstaller version to install:
...python.exe -m pip install pyinstaller==3.6
What is the real world proven working method to conda switch to a Python 2.7 environment and install mechanize using pip?
Here's a new brand new stock Anaconda install which I just tested and get:
C:\Program Files\Anaconda3\Scripts>activate py27
(py27) C:\Program Files\Anaconda3\Scripts>pip install mechanize
Collecting mechanize
Downloading mechanize-0.3.6.tar.gz (201kB)
100% |████████████████████████████████| 204kB 1.7MB/s
Complete output from command python setup.py egg_info:
mechanize only works on python 2.x
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Temp\pip-build-cmll3
thk\mechanize\
(py27) C:\Program Files\Anaconda3\Scripts>pip install --upgrade setuptools
Collecting setuptools
Downloading setuptools-36.6.0-py2.py3-none-any.whl (481kB)
100% |████████████████████████████████| 481kB 428kB/s
Installing collected packages: setuptools
Found existing installation: setuptools 27.2.0
Uninstalling setuptools-27.2.0:
Successfully uninstalled setuptools-27.2.0
Successfully installed setuptools-36.6.0
Traceback (most recent call last):
File "C:\Program Files\Anaconda3\Scripts\pip-script.py", line 5, in <module>
sys.exit(pip.main())
File "C:\Program Files\Anaconda3\lib\site-packages\pip\__init__.py", line 249, in ma
in
return command.main(cmd_args)
File "C:\Program Files\Anaconda3\lib\site-packages\pip\basecommand.py", line 252, in
main
pip_version_check(session)
File "C:\Program Files\Anaconda3\lib\site-packages\pip\utils\outdated.py", line 102,
in pip_version_check
installed_version = get_installed_version("pip")
File "C:\Program Files\Anaconda3\lib\site-packages\pip\utils\__init__.py", line 838,
in get_installed_version
working_set = pkg_resources.WorkingSet()
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 644, in __init__
self.add_entry(entry)
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 700, in add_entry
for dist in find_distributions(entry, True):
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 1949, in find_eggs_in_zip
if metadata.has_metadata('PKG-INFO'):
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 1463, in has_metadata
return self.egg_info and self._has(self._fn(self.egg_info, name))
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 1823, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 1703, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "C:\Program Files\Anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init_
_.py", line 1643, in load
mtime = os.stat(path).st_mtime
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Progra
m Files\\Anaconda3\\lib\\site-packages\\setuptools-27.2.0-py3.6.egg'
(py27) C:\Program Files\Anaconda3\Scripts>pip install ez_setup
Collecting ez_setup
Downloading ez_setup-0.9.tar.gz
Building wheels for collected packages: ez-setup
Running setup.py bdist_wheel for ez-setup ... done
Stored in directory: C:\Users\Admin1\AppData\Local\pip\Cache\wheels\53\d6\8b\a2270e6
6cf5f68c038fffcc8b871de0c4326550fb187906bab
Successfully built ez-setup
Installing collected packages: ez-setup
Successfully installed ez-setup-0.9
(py27) C:\Program Files\Anaconda3\Scripts>pip install --upgrade setuptools
Requirement already up-to-date: setuptools in c:\program files\anaconda3\lib\site-pack
ages
(py27) C:\Program Files\Anaconda3\Scripts>pip install --upgrade setuptools --force
Collecting setuptools
Using cached setuptools-36.6.0-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 36.6.0
Uninstalling setuptools-36.6.0:
Successfully uninstalled setuptools-36.6.0
Successfully installed setuptools-36.6.0
(py27) C:\Program Files\Anaconda3\Scripts>pip install mechanize
Collecting mechanize
Using cached mechanize-0.3.6.tar.gz
Complete output from command python setup.py egg_info:
mechanize only works on python 2.x
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Temp\pip-build-qo4zx
99o\mechanize\
(py27) C:\Program Files\Anaconda3\Scripts>easy_install -U setuptools
Searching for setuptools
Reading https://pypi.python.org/simple/setuptools/
Downloading https://pypi.python.org/packages/45/29/8814bf414e7cd1031e1a3c8a4169218376e
284ea2553cc0822a6ea1c2d78/setuptools-36.6.0.zip#md5=74663b15117d9a2cc5295d76011e6fd1
Best match: setuptools 36.6.0
Processing setuptools-36.6.0.zip
Writing C:\Temp\easy_install-wyi8iiw7\setuptools-36.6.0\setup.cfg
Running setuptools-36.6.0\setup.py -q bdist_egg --dist-dir C:\Temp\easy_install-wyi8ii
w7\setuptools-36.6.0\egg-dist-tmp-eq7ol_dl
warning: no files found matching '*' under directory 'setuptools\_vendor'
Copying setuptools-36.6.0-py3.6.egg to c:\program files\anaconda3\lib\site-packages
Adding setuptools 36.6.0 to easy-install.pth file
Installing easy_install-script.py script to c:\program files\anaconda3\Scripts
Installing easy_install.exe script to c:\program files\anaconda3\Scripts
error: [WinError 5] Access is denied: 'c:\\program files\\anaconda3\\Scripts\\easy_ins
tall.exe'
(py27) C:\Program Files\Anaconda3\Scripts>pip install mechanize
Collecting mechanize
Using cached mechanize-0.3.6.tar.gz
Complete output from command python setup.py egg_info:
mechanize only works on python 2.x
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Temp\pip-build-ui1ll
y8p\mechanize\
(py27) C:\Program Files\Anaconda3\Scripts>pip install --upgrade setuptools --force
(py27) C:\Program Files\Anaconda3\Scripts>
(py27) C:\Program Files\Anaconda3\Scripts>
(py27) C:\Program Files\Anaconda3\Scripts>
(py27) C:\Program Files\Anaconda3\Scripts>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\program files\anaconda3\envs\py27\lib\site-p
ackages
(py27) C:\Program Files\Anaconda3\Scripts>pip install mechanize --force
Collecting mechanize
Using cached mechanize-0.3.6.tar.gz
Complete output from command python setup.py egg_info:
mechanize only works on python 2.x
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Temp\pip-build-rsxl3
v5_\mechanize\
The main advantage of anaconda is that they've taken the time to compile packages (not just Python ones) and ensure they're compatible with each other, so that everything should "just work' for the user. This is especially useful on Windows, where compiling some Python packages may be difficult (and not everything has a wheel available on PyPI).
Such packages are available to install via conda install <foo>. Whilst you can still use pip install <foo> (and indeed will need to do so for any packages not available through anaconda's package manager), you should use the conda install where packages are available - otherwise you're not getting the benefit that anaconda intends to provide.
So (as per anaconda's docs for mechanize) you want:
conda install -c conda-forge mechanize
(You explicitly requested no attempts to convince you to use a different approach - I'm taking that to mean that you want to use anaconda and python27, rather than to definitely use pip. Obviously this is no help if pip is a must for you! I believe the "real world solution" that you're after is to use conda install rather than pip install wherever possible when using anaconda - see the answers to this question for an explanation of the differences between pip and conda)
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
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