easy_install - pyCurl install issue - python

I am trying to install pyCurl using easy_install, but I get the following error
In file included from src/docstrings.c:4:
src/pycurl.h:170:13: fatal error: 'openssl/crypto.h' file not found
include <openssl/crypto.h>
1 error generated.
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1
The openssl has been installed using brew and the version of it is LibreSSL 2.2.7. I have install xcode tools using xcode-select --install and does not seem to have fixed the issue.
I am also getting the same issue while installing using pip.

This might fix your issue.
$export PYCURL_SSL_LIBRARY=openssl
$export LDFLAGS="-L/usr/local/opt/openssl/lib"
$export CPPFLAGS="-I/usr/local/opt/openssl/include"
Now you can easy_install or if you are using pip below should be the command.
$ pip install --no-cache-dir --compile --ignore-installed --install-option="--with-openssl" pycurl

Related

pipx install eth-brownie error : Fatal error from pip prevented installation

was trying this cmd:pipx install eth-brownie, but encountered this error
I have tried, but not working:
reinstall pipx
using pip install eth-brownie
pip install bitarray, cytoolz and lru-dict seperately
Error in Text:
Fatal error from pip prevented installation. Full pip output in file:
/Users/pilotbryan/.local/pipx/logs/cmd_2022-05-22_15.26.44_pip_errors.log
pip failed to build packages:
bitarray
cytoolz
lru-dict
Some possibly relevant errors from pip install:
error: subprocess-exited-with-error
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command '/usr/bin/gcc' failed with exit code 1
error: legacy-install-failure
The problem is probably with the Command Line Tools package- that's why pip install was failing. You can try to download the tool using:
xcode-select --install in terminal. If it does not work for you, try resetting the xcode install. I found useful tutorial in here: https://gist.github.com/Justintime50/2349ff5e62555aa097acbf519bbc27af

Installing psycopg2 command 'gcc' failed with exit status 1

I'm trying to install psycopg2 but
pip install psycopg2 brings to error: command 'gcc' failed with exit status 1
Command line tools are installed
MacOS 10.15
This is likely because you don't have the PostgreSQL devel library installed. You have a few options:
(1) Install the binary with pip install psycopg2-binary
(2) Install PostgreSQL with HomeBrew: brew install postgresql, then pip install psycopg2.
You can probably just install the binary.
after updating the pip package error went away
To Update python3 pip package
wget https://bootstrap.pypa.io/get-pip.py
/usr/bin/python3 get-pip.py

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zv/vwwhcqfs4xj_9b09bbs1c3cm0000gn/T/pip-build-TZP2Ho/pyquil/

I'm trying to run this in Terminal:
pip install pyquil
But then this error comes up:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/zv/vwwhcqfs4xj_9b09bbs1c3cm0000gn/T/pip-build-8VPMQz/pyquil/
I've read through many other threads with the same problem and tried some solutions, but still no luck.
Attempted Solutions:
Add this to bash profile:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Updating pip/setuptools
Using ez_setup
I'm trying to follow this, and have the prerequisites: http://pyquil.readthedocs.io/en/latest/start.html
Any ideas?
Try upgrading your pip & pip setup tools and then try,
sudo pip install pyobjc-core
sudo pip install pyobjc
sudo pip install --upgrade pip
sudo pip install --upgrade setuptools
Then
sudo pip install pyquil

Python pip3 install Scrapy or Twisted gives"Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-51x6vr4n/Twisted/"

I want install scrapy with pip3,
sudo pip3 install Scrapy -i https://pypi.douban.com/simple
but failed:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-s3504tu6/Twisted/
so I used
sudo pip3 install Scrapy -i https://pypi.douban.com/simple
but it failed again. How to solve this error?
Try upgrading setuptools
pip install --upgrade setuptools
or
easy_install -U setuptools
And check if it works

Error when installing using pip

Not sure whats going on here but I am getting an error every time I try to install something using pip I get the following error:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-build-V4hy8S/PySocks/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-bIOl7C-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-build-V4hy8S/PySocks
Try
sudo pip install -U setuptools
If this doesn't solve your problem then
Firstly, you need the python-dev package because Pillow needs compile headers defined.
sudo apt-get install python-dev
On Ubuntu 14.04 you need few extra packages to get pillow working. Install all of them with the command:
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
Seems that your PiP can't access Setuptools as per the "import setuptools" in the error. Try the below first then try running your pip install again.
sudo pip install -U setuptools
Solution from Github Issue
Launch the command prompt with 'run as administrator' rights before installing.
then try the script -
pip install package_name_here
if error is thrown,then import setup tools
pip install -U setuptools
if again error thrown then upgrade your pip installer using this script(personally worked for me)
python -m pip install --upgrade pip
I had the same problem on Windows Git Bash but installing setuptools did not fix it. Then I noticed another error message further up:
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
That link was dead but ultimately this page had a link to the correct download: https://wiki.python.org/moin/WindowsCompilers
I installed Microsoft Build Tools for Visual Studio 2017 and that resolved it.
It majorly depends on the type of packages you suppose to install.
Frequently its failing due to the missing of
libsasl2-dev a package for authentication abstraction library which use in the Ubuntu version
First, install:
sudo apt-get install libsasl2-dev
then run:
pip install <<\package_name>>
first run as superuser:
sudo su
then :
pip install PyOpenGL PyOpenGL_accelerate
If you get this error on Windows, like I did, then just run the command-line tool (cmd.exe or Powershell) as Administrator and try again.

Categories