I'm trying to install pygame inside a virtualenvs on windows (I use powershell-virtualenwrapper).
But when I run pip install hg+http://www.bitbucket.org/pygame/pygame it fail with this log:
------------------------------------------------------------
C:\Users\Marci\.virtualenvs\pygame\Scripts\pip run on 05/22/15 14:39:29
Downloading/unpacking hg+http://bitbucket.org/pygame/pygame
Cloning hg http://bitbucket.org/pygame/pygame to c:\users\marci\appdata\local\temp\pip-fyauuh-build
Found command 'hg' at 'C:\\Program Files\\TortoiseHg\\hg.exe'
Running command "C:\Program Files\TortoiseHg\hg.exe" clone --noupdate -q http://bitbucket.org/pygame/pygame c:\users\marci\appdata\local\temp\pip-fyauuh-build
Running command "C:\Program Files\TortoiseHg\hg.exe" update -q
Running setup.py (path:c:\users\marci\appdata\local\temp\pip-fyauuh-build\setup.py) egg_info for package from hg+http://bitbucket.org/pygame/pygame
WARNING, No "Setup" File Exists, Running "config.py"
Using WINDOWS configuration...
Path for SDL not found.
Too bad that is a requirement! Hand-fix the "Setup"
Path for FONT not found.
Path for IMAGE not found.
Path for MIXER not found.
Path for SMPEG not found.
Path for PNG not found.
Path for JPEG not found.
Path for PORTMIDI not found.
Path for FFMPEG not found.
Path for COPYLIB_tiff not found.
Path for COPYLIB_z not found.
Path for COPYLIB_vorbis not found.
Path for COPYLIB_ogg not found.
If you get compiler errors during install, doublecheck
the compiler flags in the "Setup" file.
Continuing With "setup.py"
Error with the "Setup" file,
perhaps make a clean copy from "Setup.in".
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "c:\users\marci\appdata\local\temp\pip-fyauuh-build\setup.py", line 174, in <module>
extensions = read_setup_file('Setup')
File "C:\Python27\Lib\distutils\extension.py", line 168, in read_setup_file
line = expand_makefile_vars(line, vars)
File "C:\Python27\Lib\distutils\sysconfig.py", line 387, in expand_makefile_vars
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
TypeError: cannot concatenate 'str' and 'NoneType' objects
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "config.py"
Using WINDOWS configuration...
Path for SDL not found.
Too bad that is a requirement! Hand-fix the "Setup"
Path for FONT not found.
Path for IMAGE not found.
Path for MIXER not found.
Path for SMPEG not found.
Path for PNG not found.
Path for JPEG not found.
Path for PORTMIDI not found.
Path for FFMPEG not found.
Path for COPYLIB_tiff not found.
Path for COPYLIB_z not found.
Path for COPYLIB_vorbis not found.
Path for COPYLIB_ogg not found.
If you get compiler errors during install, doublecheck
the compiler flags in the "Setup" file.
Continuing With "setup.py"
Error with the "Setup" file,
perhaps make a clean copy from "Setup.in".
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "c:\users\marci\appdata\local\temp\pip-fyauuh-build\setup.py", line 174, in <module>
extensions = read_setup_file('Setup')
File "C:\Python27\Lib\distutils\extension.py", line 168, in read_setup_file
line = expand_makefile_vars(line, vars)
File "C:\Python27\Lib\distutils\sysconfig.py", line 387, in expand_makefile_vars
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
TypeError: cannot concatenate 'str' and 'NoneType' objects
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\marci\appdata\local\temp\pip-fyauuh-build
Exception information:
Traceback (most recent call last):
File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\Marci\.virtualenvs\pyGame\lib\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 "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\req.py", line 1229, in prepare_files
req_to_install.run_egg_info()
File "C:\Users\Marci\.virtualenvs\pyGame\lib\site-packages\pip\req.py", line 325, in run_egg_info
command_desc='python setup.py egg_info')
File "C:\Users\Marci\.virtualenvs\pyGame\lib\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 c:\users\marci\appdata\local\temp\pip-fyauuh-build
Related
My setup:
MacOS, Mojave, Mac Mini A1993 (2018)
Python 3.7.4, virtual environment
pip upgraded, setuptools wheel upgraded, XCode and command line tools installed.
Trying to run (sudo) pip3 install opencv-contrib-python==4.5.3.56 fails:
copying _skbuild/macosx-10.14-x86_64-3.7/cmake-install/share/opencv4/haarcascades/haarcascade_russian_plate_number.xml -> _skbuild/macosx-10.14-x86_64-3.7/cmake-install/cv2/data/haarcascade_russian_plate_number.xml
copying _skbuild/macosx-10.14-x86_64-3.7/cmake-install/share/opencv4/haarcascades/haarcascade_smile.xml -> _skbuild/macosx-10.14-x86_64-3.7/cmake-install/cv2/data/haarcascade_smile.xml
copying _skbuild/macosx-10.14-x86_64-3.7/cmake-install/share/opencv4/haarcascades/haarcascade_upperbody.xml -> _skbuild/macosx-10.14-x86_64-3.7/cmake-install/cv2/data/haarcascade_upperbody.xml
Copying files from non-default sourcetree locations
copying LICENSE.txt -> _skbuild/macosx-10.14-x86_64-3.7/cmake-install/cv2/LICENSE.txt
copying LICENSE-3RD-PARTY.txt -> _skbuild/macosx-10.14-x86_64-3.7/cmake-install/cv2/LICENSE-3RD-PARTY.txt
Traceback (most recent call last):
File "/Users/exhibition/Documents/venv_test_4/venv4/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/exhibition/Documents/venv_test_4/venv4/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/exhibition/Documents/venv_test_4/venv4/lib/python3.7/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 262, in build_wheel
metadata_directory)
File "/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-build-env-_g912da_/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 245, in build_wheel
wheel_directory, config_settings)
File "/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-build-env-_g912da_/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-build-env-_g912da_/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 282, in run_setup
self).run_setup(setup_script=setup_script)
File "/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-build-env-_g912da_/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 462, in <module>
main()
File "setup.py", line 262, in main
cmake_source_dir=cmake_source_dir,
File "/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-build-env-_g912da_/overlay/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 686, in setup
skbuild_kw["cmake_install_dir"],
File "setup.py", line 413, in _classify_installed_files_override
cmake_install_dir=cmake_install_reldir,
TypeError: _classify_installed_files() got an unexpected keyword argument 'cmake_install_dir'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for opencv-contrib-python
Failed to build opencv-contrib-python
Trying to run new version (sudo) pip3 install opencv-contrib-python fails:
Traceback (most recent call last):
An error occurred while building with CMake.
Command:
cmake --build . --target install --config Release --
Install target:
install
Source directory:
/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-install-6kfw2s0l/opencv-contrib-python_1cdac7916ab34fb98d01dacc90a69e53
Working directory:
/private/var/folders/42/tzk3gt4548d4s2znyqlsx_qm0000gn/T/pip-install-6kfw2s0l/opencv-contrib-python_1cdac7916ab34fb98d01dacc90a69e53/_skbuild/macosx-10.14-x86_64-3.7/cmake-build
Please check the install target is valid and see CMake's output for more information.
[end of output]
Based on issue #648 my first failed attempt is due to skbuild update, has anyone got past this? I'd want the older opencv version ideally but not a must. https://github.com/opencv/opencv-python/issues/648
Many thanks for any help!
Keep running into this issue trying to download pygame. How do i download it with pip? I use a 64bit windows 10 w/ python 3.7... Thanks
C:\Users\Antoine>python -m pip install -U pygame --user
Collecting pygame
Using cached https://files.pythonhosted.org/packages/61/06/3c25051549c252cc6fde01c8aeae90b96831370884504fe428a623316def/pygame-1.9.3.tar.gz
Complete output from command python setup.py egg_info:
WARNING, No "Setup" File Exists, Running "config.py"
Using WINDOWS configuration...
Path for SDL not found.
Too bad that is a requirement! Hand-fix the "Setup"
Path for FONT not found.
Path for IMAGE not found.
Path for MIXER not found.
Path for PNG not found.
Path for JPEG not found.
Path for PORTMIDI not found.
Path for COPYLIB_tiff not found.
Path for COPYLIB_z not found.
Path for COPYLIB_vorbis not found.
Path for COPYLIB_ogg not found.
If you get compiler errors during install, doublecheck
the compiler flags in the "Setup" file.
Continuing With "setup.py"
Error with the "Setup" file,
perhaps make a clean copy from "Setup.in".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Antoine\AppData\Local\Temp\pip-install-0c2lpkkq\pygame\setup.py", line 165, in <module>
extensions = read_setup_file('Setup')
File "C:\Python\Python37\lib\distutils\extension.py", line 171, in read_setup_file
line = expand_makefile_vars(line, vars)
File "C:\Python\Python37\lib\distutils\sysconfig.py", line 407, in expand_makefile_vars
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
TypeError: can only concatenate str (not "NoneType") to str
Pygame doesn't install properly in 3.7. Install 3.6.6 instead. I had the same problem
I have been trying to install yajl>=0.3.5 package and i get the following error. This happens for only this specific package and not for others i am currently using. The command is as follows.
pip install yajl>=0.3.5
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\ANURAG~1\AppData\Local\Temp\pip-build-epamw9qh\yajl\
Alternatively
I know there is a similar question asked and have tried all specified solutions in the mentioned question. Here are my findings.
1) I have successfully installed setuptools,upgraded them and also installed ez_setup. pip install yajl>=0.3.5 gives the same error as above even after this.
2) I have downloaded the source code of yajl>=0.3.5 and tried the following command.
cd yajl && python setup.py bdist_wheel
the error i get is as below.
Collecting yajl>=0.3.5
Using cached yajl-0.3.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ANURAG~1\AppData\Local\Temp\pycharm-packaging\yajl\setup.py",
line 64, in
subprocess.call(['git', 'submodule', 'update',])
File "C:\Program Files\Python\lib\subprocess.py", line 560, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Program Files\Python\lib\subprocess.py", line 950, in init
restore_signals, start_new_session)
File "C:\Program Files\Python\lib\subprocess.py", line 1220, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\ANURAG~1\AppData\Local\Temp\pycharm-packaging\yajl\
PS: I am using windows 10.
My python version is 2.7. I tried to install pyjags using pip install pyjags but got such error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags/setup.py", line 68, in <module>
add_jags(ext)
File "/private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags/setup.py", line 46, in add_jags
version = add_pkg_config(ext, 'jags')
File "/private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags/setup.py", line 34, in add_pkg_config
output = subprocess.check_output(args)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/dh/cyj9qhyj271945lvydyv5yr80000gn/T/pip-build-yuHm33/pyjags
I just deployed a python package and had same errors when I tried to install via pip. Turns out the main reasons was that the project artifacts (static files, etc) were not included in the MANIFEST file or it couldn't load a file path. I think you might want to consult the documentation here.
The line below was copied from the docs:
The setup.py script uses pkg-config to locate the JAGS library. If JAGS is installed in some non-standard location, then you may need to configure pkg-config to pick up correct metadata file. For example, if JAGS have been configured with --prefix=/opt/, then JAGS metadata file would be located in /opt/lib/pkgconfig/. This path can be included in pkg-config search path as follows:
export PKG_CONFIG_PATH=/opt/lib/pkgconfig/:$PKG_CONFIG_PATH
From your track trace, it seems like you failed to configure that.
pip is not a supported installation method. Read the installation instructions on the website enter link description here.
How to reproduce:
Get an up-to-date Arch Linux installation (or Travis CI instance)
Run this:
git clone https://github.com/l0b0/make-includes.git
cd make-includes
git checkout 643b15af0cf246ab669176b2c564bf9f88b63c0b # current HEAD
make test
Result:
/tmp/tmp.Hwv8afXNsE/virtualenv/virtualenv-12.1.1/virtualenv.py --python=/tmp/tmp.Hwv8afXNsE/Python-2.7.10-install/bin/python2.7 /tmp/tmp.Hwv8afXNsE/virtualenv-2.7.10
Traceback (most recent call last):
File "/tmp/tmp.Hwv8afXNsE/virtualenv/virtualenv-12.1.1/virtualenv.py", line 2352, in <module>
main()
File "/tmp/tmp.Hwv8afXNsE/virtualenv/virtualenv-12.1.1/virtualenv.py", line 763, in main
options, args = parser.parse_args()
File "/usr/lib/python3.5/optparse.py", line 1370, in parse_args
values = self.get_default_values()
File "/tmp/tmp.Hwv8afXNsE/virtualenv/virtualenv-12.1.1/virtualenv.py", line 642, in get_default_values
return optparse.Values(defaults)
File "/usr/lib/python3.5/optparse.py", line 827, in __init__
setattr(self, attr, val)
TypeError: attribute name must be string, not 'NoneType'
python.mk:85: recipe for target '/tmp/tmp.Hwv8afXNsE/virtualenv-2.7.10' failed
make[1]: *** [/tmp/tmp.Hwv8afXNsE/virtualenv-2.7.10] Error 1
make[1]: Leaving directory '/home/user/dev/make-includes'
Makefile:32: recipe for target 'test-python-virtualenv' failed
make: *** [test-python-virtualenv] Error 2
Interestingly, if I run that last command again just afterwards, it works:
$ /tmp/tmp.Hwv8afXNsE/virtualenv/virtualenv-12.1.1/virtualenv.py --python=/tmp/tmp.Hwv8afXNsE/Python-2.7.10-install/bin/python2.7 /tmp/tmp.Hwv8afXNsE/virtualenv-2.7.10
Running virtualenv with interpreter /tmp/tmp.Hwv8afXNsE/Python-2.7.10-install/bin/python2.7
New python executable in /tmp/tmp.Hwv8afXNsE/virtualenv-2.7.10/bin/python2.7
Also creating executable in /tmp/tmp.Hwv8afXNsE/virtualenv-2.7.10/bin/python
Installing setuptools, pip...done.
What gives?