python setup.py build --compiler=mingw32
Traceback (most recent call last):
File "setup.py", line 4, in <module>
import versioneer
File "/cygdrive/c/Users/Mansi/Downloads/cvxopt-1.3.0/versioneer.py", line 1194
"--always", "--long", *MATCH_ARGS],
^
SyntaxError: invalid syntax
Does anyone happen to know why this error is coming?
Related
I tried to install ssl package for my computer (Pop_OS 21.10) with the command python3 -m pip install ssl. Then pip returned this mess:
Processing ./ssl-1.16.tar.gz
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-765tgjcs/setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.9/urllib/request.py", line 88, in <module>
import http.client
File "/usr/lib/python3.9/http/client.py", line 1391, in <module>
import ssl
File "/tmp/pip-req-build-765tgjcs/ssl/__init__.py", line 140
except SSLError, x:
^
SyntaxError: invalid syntax
Original exception was:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-765tgjcs/setup.py", line 33
print 'looking for', f
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I have checked pip version (22.0.4) and setuptools (62.1.0), it seem normal.
What is the problem in here? How can I solve it?
I have installed conda and created a python3.7 environment. Then I have installed pandas and now I'm getting the following error when I try to import pandas.
Traceback (most recent call last):
File "/me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/__init__.py", line 29, in <module>
File "/me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/_libs/__init__.py", line 13, in <module>
ImportError: /me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/_libs/interval.cpython-37m-x86_64-linux-gnu.so: invalid ELF header
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/__init__.py", line 37, in <module>
ImportError: C extension: /me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/_libs/interval.cpython-37m-x86_64-linux-gnu.so: invalid ELF header not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --force' to build the C extensions first.Traceback (most recent call last):
File "/me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/__init__.py", line 29, in <module>
File "/me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/_libs/__init__.py", line 13, in <module>
ImportError: /me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/_libs/interval.cpython-37m-x86_64-linux-gnu.so: invalid ELF header
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/__init__.py", line 37, in <module>
ImportError: C extension: /me/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/_libs/interval.cpython-37m-x86_64-linux-gnu.so: invalid ELF header not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --force' to build the C extensions first.
Any ideas?
It turns out this is a bug with conda and pandas.
Here is the ticket:
BUG: Pandas Import is failing under Conda Python 3.7
Using conda-forge fixed the issue for me.
I am getting the following error when executing this command "sudo pip install django"
Traceback (most recent call last):
File "/usr/bin/pip", line 7, in <module>
from pip._internal import main
File "/usr/lib/python2.6/site-packages/pip/_internal/__init__.py", line 42, in <module>
from pip._internal import cmdoptions
File "/usr/lib/python2.6/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
from pip._internal.index import (
File "/usr/lib/python2.6/site-packages/pip/_internal/index.py", line 526
{str(c.version) for c in all_candidates},
^
SyntaxError: invalid syntax
And python installed version is Python 2.7.11 using this command python -V
Execute "python setup3.py install" reported this error
I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
D:\Software Package\pywin32-master\pywin32-master>python setup3.py install
Converting...
Executing...
Building pywin32 3.6.221.0
Traceback (most recent call last):
File "setup3.py", line 16, in <module>
exec(str(got))
File "<string>", line 305, in <module>
RuntimeError: Can't find the Windows SDK
D:\Software Package\pywin32-master\pywin32-master>python setup.py install
File "setup.py", line 127
print "Building pywin32", pywin32_version
^
SyntaxError: Missing parentheses in call to 'print'
I use python3.5, i recently installed spamc using pip.
When i try to import spamc, an error is raised:
How can i resolve this error?Should i find and install other library where spamc is included in it?
import spamc
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import spamc
File "/usr/local/lib/python3.5/dist-packages/spamc/__init__.py", line 24, in <module>
from spamc.client import SpamC
File "/usr/local/lib/python3.5/dist-packages/spamc/client.py", line 230
except socket.gaierror, err:
^
SyntaxError: invalid syntax