I've recently decided to learn OpenGl in python.
I installed PyOpenGL using pip3 install PyOpenGl PyOpenGl_accelerate. I was then about to follow a
tutorial for PyOpenGL. The first item was to install PyOpenGLContext.
I tried to install PyOpenGLContext with both pip3 install OpenGLContext and pip3 install PyDispatcher PyVRML97 OpenGLContext and both gave me the same error:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/3r/xfny397j6j98y1sjgh_s574m0000gn/T/pip-build-o7zx54vx/OpenGLContext/setup.py", line 10
except ImportError, err:
^
SyntaxError: invalid syntax
So, there's a syntax error there. How do I get around this? If you need more information, please let me know. I am trying to install this on a MacBook Pro (2013) version for Python3.5.
It should work if you download and install the wheel from Unofficial Windows Binaries for Python Extension Packages:
Download the OpenGLContext‑2.3.0‑py2.py3‑none‑any.whl installation file to a an arbitrary directory.
cd to that directory in a command line and install using pip install OpenGLContext‑2.3.0‑py2.py3‑none‑any.whl
It looks like OpenGLContext has not been updated in a while, and thus is not compatible with Python 3.5.
Having a look at https://pypi.python.org/pypi/OpenGLContext yields that the last update was in 2014.
You probably want to either use an older python version, or a different library.
Related
I have installed Anaconda 2.5 and used spyder with Python2.7 for sometime. I used pdfminer those days. Then I wanted to use Python3.6. So I have uninstalled Anaconda and installed Anaconda3.5. And there is no problem in using Python3.5 and I used more packages too. But now am trying to install pdfminer. Am getting some errors.
Using cached https://files.pythonhosted.org/packages/57/4f/e1df0437858188d2d36466a7bb89aa024d252bd0b7e3ba90cbc567c6c0b8/pdfminer-20140328.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\PRIYA~1.MUT\AppData\Local\Temp\pip-install-fzctx8lo\pdfminer\setup.py",line 3, in <module>
from pdfminer import __version__
File "C:\Users\PRIYA~1.MUT\AppData\Local\Temp\pip-install-fzctx8lo\pdfminer\pdfminer\__init__.py", line 5
print __version__
^
`SyntaxError: Missing parentheses in call to 'print'. Did you mean print(__version__)?`
I knew there is some issues because print __version__ needs to be like print (__version__). but I don't know where I need to edit. And this path
"C:\Users\PRIYA~1.MUT\AppData\Local\Temp\pip-install-fzctx8lo\pdfminer\pdfminer__init__.py"
doesn't exist on my system.Kindly help me in solving this.
I manually downloaded pdfminer-20140328.tar.gz from the link https://pypi.org/project/pdfminer/ and tried to install it using the command pip install -e <path>. But I got the same error. Then I have opened the pdfminer__init__.py file and edited accordingly to Python3.6. I have no idea why pdfminer package doesn't support Python3.6 directly. Eventhough installed, there is some dependency error. So I can't use that in Python3.6.
I'm new to Linux and I'm trying to install packages through a Makefile so users can run my Python 3 program.
sudo pip install python3-weather-api
However, even after uninstalling a previously installed version, the package seems to be going to the 2.7 version of Python.
Requirement already satisfied: python3-weather-api in /usr/local/lib/python2.7/dist-packages
Then, when I run the program, it can't find the module (it works locally in Python 3 just fine).
SystemExit: 1
Traceback (most recent call last):
File "project.py", line 11, in <module>
from weather import Weather
ImportError: No module named 'weather'
Is there a way I can point the original installation so when I run python3 project.py it can find the module?
Thanks very much!
I would recommend you to use pyenv to manage your Python installations, but, for now, try to run:
sudo pip3 install python3-weather-api
In the attempt to get Easy_Install working with Python34 and Python27 I've exhausted the options listed in the documentation.
Is there a way to add the Python\34\Scripts folder so I stop getting the following error?
>>> easy_install numpy
File "<stdin>", line 1
easy_install numpy
^
SyntaxError: invalid syntax
AND
>>> easy_install
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'easy_install' is not defined
>>>
You are running shell commands from the Python REPL, not from the Windows command line. Quit the REPL by typing quit(), exit(), or hitting CtrlD. Open a Windows command prompt by hitting WinR, typing cmd, and hitting Enter. easy_install should now work, although for most use cases (unless you're installing from an egg), pip should be sufficient. It is already installed with Python 3.4 and 2.7.9, and can otherwise be installed by googling install pip and following the first link. pip install numpy is definitely the preferred way to go, as pip supports wheels, which more and more packages (including numpy) are uploading to PyPI.
Alternatively, search Christoph Gohlke's Python Extension Packages for Windows Repository for the package you're looking for. The version of numpy there comes statically linked to Intel's high-performance MKL library, as do a number of numpy-dependent packages like scipy and matplotlib. Simply download the appropriate .whl files from Gohlke's site, run pip install package_name_version_whatever.whl, and you're good to go.
I'm trying to install pygame in my enthought canopy python distribution. I'm using the latest version of canopy for 64-bit Mac (Python 2.7.6), and I'm using Mavericks OS. I know that installing pygame should be possible since I managed to get pygame working with the official python 2.7.6 from the python website using the binary installation file available here.
The first thing I tried was ensuring that canopy was my default python, and the installation file linked above, but this just re-installed pygame into the official python distribution.
Next I tried pip, which I've used to install other packages successfully (e.g., spyder). The following is what happens when I try pip install pygame:
Downloading/unpacking pygame
Downloading pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip (7.4Mb): 7.4Mb
downloaded
Running setup.py egg_info for package pygame
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory: '/Users/Sam/build/pygame/setup.py'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 14, in <module>
IOError: [Errno 2] No such file or directory:
'/Users/Sam/build/pygame/setup.py'
This is different to the error reported here, so I'm not sure at all what's going on. Any suggestions?
On Yosemite and Canopy 64bit assuming you have homebrew, pygame installed fine with:
brew install sdl sdl_ttf sdl_image sdl_mixer
brew install hg
sudo pip install hg+http://bitbucket.org/pygame/pygame
I think I found a solution: I simply used pip to install pygame from a specific location, using sudo pip install hg+http://bitbucket.org/pygame/pygame. Unlcear why this worked, however.
You need to install a 32 bit version of Python. PyGame doesn't run on the 64 bit builds, and OSX ships with a 64 bit build.
download from here python2.7.3
then download pygames
The title basically explains it all.
I am running Windows 8 (windows 7 was previously installed... If it helps with answering) and am using Python 2.7.
Upon using the code:
python setup.py install
I am getting this error:
C:\Users\Nicholas\Desktop\taggit>python setup.py install
Traceback (most recent call last):
File "setup.py", line 52, in
from setuptools import setup
ImportError: No module named setuptools
Any help?
Thanks in advance
Nicholas
You need to install setuptools, which allows packages to be configured for your Python installation. It is not included with the default Python installer.
From this link you can download Windows installers for many Python packages (I have linked it directly to setuptools). Make sure you download the version that matches your Python installation.
in Python 3:
pip3 install setuptools
And in Python 2.x:
pip install setuptools