I want to install python-igraph for Python 3.4 on Mac OSX 10.10.
When I do
jenny$ pip3 install python-igraph
I get
checking whether the C compiler works... no
configure: error: in `/private/var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip_build_jenny/python-igraph/tmp/igraph.p_05kabc/igraph-0.7.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
Extracting igraph-0.7.1.tar.gz...
Configuring igraph...
Could not download and compile the C core of igraph.
----------------------------------------
Cleaning up...
Command /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -c "import setuptools, tokenize;__file__='/private/var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip_build_jenny/python-igraph/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip-vudi0il0-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/q7/jc5nc2px3p1_sr6gnj7749wc0000gq/T/pip_build_jenny/python-igraph
I checked out this similar question, and the linked githib issue and then tried
pip3 install python-igraph --install-option="--c-core-version=0.7.1"
based on the information I found, with essentially the same error.
Based on the comments in that stackoverflow question, I also tried looking for the developer branch of python-igraph on github but I can't find it.
I'm a little lost. Can anyone tell me how to install this?
Do you have a c compiler installed?
How about Xcode Command Line Tools?
Try executing the following from your terminal:
xcode-select --install
And click the "Install" button on the pop-up window.
After it's installed, verify the Xcode Command Line Tools installation with:
gcc --version
Then try your pip3 installation again.
Related
trying to install uWSGI from the command line
pip install uwsgi
results in a long stack trace, here is the end of it:
/usr/bin/x86_64-linux-gnu-ld: /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a(parser.o):
relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object;
recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
*** error linking uWSGI ***
----------------------------------------
Command "/home/user/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ve0nx9k8/uwsgi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-l_7f937a/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/venv/include/site/python3.6/uwsgi" failed with error code 1 in /tmp/pip-install-ve0nx9k8/uwsgi/
I'm using Python 3.6. Python 2 works and Python 3.7 works, but unfortunately I need to use Python 3.6. There is nothing else in the virtual environment, and this is a pretty new reinstall of ubuntu.
The error means that the linker wants to build a Position Independent Executable (PIE object), but it can't because the library libpython3.6m.a was built without the support of this kind of linking.
I faced this issue when using Python installed via pyenv.
To fix the issue in this case, reinstall Python with special compiler flags:
CONFIGURE_OPTS=--enable-shared pyenv install 3.7.7 # use your Python version
This is mentioned in their wiki, but for me, it was unclear when such flag is required.
I had this error trying to build with the system python. When I switched to pyenv and installed a custom python version uWSGI installed fine.
Here is the environment:
OS:windows 10
Django:2.0rc
Python:3.6
pip:10.0.0
visual studio community 2017
And the error message:
running build_ext
building 'twisted.test.raiser' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
Command "c:\users\airy\appdata\local\programs\python\python36\python.exe -u -c "import setuptools,
tokenize;__file__='C:\\Users\\Airy\\AppData\\Local\\Temp\\pip-install-0a1gjuaj\\twisted\\
setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record C:\Users\Airy\AppData\Local\Temp
\pip-record-k1vjz5aa\install-record.txt --single-version-externally-managed
--compile" failed with error code 1 in C:\Users\Airy\AppData\Local\Temp\pip-install-0a1gjuaj\twisted\
I have already installed the build tools following the link description but it still doesn't work. If someone has solved it, please tell me how to fixed it.
Download twisted from this link.
Downloading Twisted‑18.4.0‑cp36‑cp36m‑win32.whl worked for me because I'm using Python 3.6. Download the version according to the python that you use.
After you download Twisted from the given link, open up a cmd where the file is located and run pip install Twisted‑18.4.0‑cp36‑cp36m‑win32.whl. pip will install Twisted from this file.
If you're doing it in a virtualenv, activate the virtualenv and install Twisted after that in the same process.
After that, you'll be able to install channels or whatever.
if you followed the instructions as mention by #rahim.nagori and encounter the problem as mention by #DiptangsuGoswami. just download the 32bit version of twisted or 64bit (if what you used previously was 32bit). it worked for me!
I am new to the Wagtail cms and am taking over a friend's project for his site.
I have downloaded his repo and am trying to get it to run locally. I have followed the steps on the wagtail documentation http://docs.wagtail.io/en/v1.12.1/getting_started/index.html
but in the site's requirements.txt file, there are some dependencies that just are not installing and giving errors:
here is the output of when trying to install the requirements:
build\lib.win32-2.7\psycopg2\_psycopg.pyd : fatal error LNK1120: 62 unresolved externals
error: command 'C:\\Users\\Adam\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\link.exe' failed with exit status 1120
Rolling back uninstall of psycopg2
Command "c:\python27\python.exe -u -c "import setuptools,
tokenize;__file__='c:\\users\\Adam\\appdata\\local\\temp\\pip-build-
bykm5e\\psycopg2\\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code,
__file__, 'exec'))" install --record c:\users\Adam\appdata\local\temp\pip-
cidizd-record\install-record.txt --single-version-externally-managed --
compile" failed with error code 1 in c:\users\Adam\appdata\local\temp\pip-
build-bykm5e\psycopg2\
(The full output is here: https://pastebin.com/m1ukkei8)
Any help would be greatly appreciated - I am using Python 2.7 and have tried reinstalling psycopg and have installed postresql
Your windows linker is throwing out errors as you don't have c++ libraries for an extension to be built properly.
I would suggest to you to rather install it through wheel file
by running
pip install some-package.whl
I'm not sure if this is the answer, but the version of psycopg2 that you're using had a bug that prevented installation using pip, due to some bug in pip. Try version 2.5.3 and see if that fixes it.
Environment : Kali Linux 2
I started reading this book "Python network programming cookbook" and the writers listed few modules I am gonna need during the book i was able to install all of them except #netifaces, I tried both the "pip install netifaces" and "python setup.py install" methods but both made appear this message:
x86_64-linux-gnu-gcc: error trying to exec 'cc1': execvp: No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-lsf_5N/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-TsHwUh-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-lsf_5N/netifaces
Storing debug log for failure in /root/.pip/pip.log
I tried to install python-dev and all the libraries I could find in previous asked questions here but nothing made it happen
Thank you all for your help
It looks like you are missing gcc, which is needed to compile netifaces.
I've never used Kali Linux before but you should have apt so, you can try: sudo apt-get install gcc to install the missing package.
Hopefully this solves your problem.
Running Mac OS Lion
I was trying to do some scraping with Mechanize but I was having massive issues with javascript. So, after some browsing I decided to try out Spynner. I've tried to download it with both pip and easy_install but I get the same error each time:
Command /usr/bin/python -c "import setuptools;__file__='/private/tmp/pip-build-root/autopy/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-53vGzx-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/tmp/pip-build-root/autopy
Looking for some help (or maybe another suggestion rather than Spynner).
I have XCode installed and updated (along with command line tools).
I've made the links between gcc and gcc-4.2 (ln -s /usr/bin/gcc /usr/bin/gcc-4.21)
I have virtualenv installed. I only mention that because I've noticed that a lot of the same problems occur with its installation as well.