(env) user#name:~/$ pip install -r requirements.txt
Collecting Shapely==1.5.13 (from -r requirements.txt (line 1))
Using cached Shapely-1.5.13.tar.gz
Complete output from command python setup.py egg_info:
Failed `CDLL(libgeos_c.so.1)`
Failed `CDLL(libgeos_c.so)`
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-p0Fy8v/Shapely/setup.py", line 38, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "/tmp/pip-build-p0Fy8v/Shapely/shapely/_buildcfg.py", line 167, in <module>
fallbacks=['libgeos_c.so.1', 'libgeos_c.so'])
File "/tmp/pip-build-p0Fy8v/Shapely/shapely/_buildcfg.py", line 161, in load_dll
libname, fallbacks or []))
OSError: Could not find library geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so']
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-p0Fy8v/Shapely/
requirements.txt content :
Shapely==1.5.13
Flask==0.10.1
matplotlib==1.5.1
scipy==0.19.0
plumbum==1.6.2
numpy==1.12.1
ipython==5.5
Pillow==4.2.1
opencv-python==3.2.0.6
trying to run pip install -r requirements.txt but i keep on getting that error described above, i just installed python and pip and basically everything else after my format on linux 16.04 so not sure what's going wrong.
Edit:
I removed Shapely==1.5.13 from the requirements.txt to test if it;s the issue and i got that error again Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-oVKNjq/matplotlib/
Related
I'm trying to install flask-mysql on ubuntu 18.04 and I keep getting this error:
(base) ether#ether:~/Documents/loginsystem$ pip install flask-mysqldb
Collecting flask-mysqldb
Using cached https://files.pythonhosted.org/packages/62/e3/955c845efe1aacf30c8e2607470544ede36aa1044f6382c809f13e014104/Flask-MySQLdb-0.2.0.tar.gz
Requirement already satisfied: Flask>=0.10 in /home/ether/anaconda3/lib/python3.7/site-packages (from flask-mysqldb) (1.0.2)
Collecting mysqlclient (from flask-mysqldb)
Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-txlk8w2u/mysqlclient/setup.py", line 16, in <module>
metadata, options = get_config()
File "/tmp/pip-install-txlk8w2u/mysqlclient/setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-txlk8w2u/mysqlclient/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-txlk8w2u/mysqlclient/
I tried to run sudo pip install and pip3 install flask-mysqldb but each time I received the same error as posted above.
What can I do to fix this?
The error message is pretty clear:
OSError: mysql_config not found
You need mysql_config. Install either libmariadbclient-dev or libmysqlclient-dev with apt.
Then try using pip again, but not with sudo.
Mixing system-level Python packages and pip-installed packages is a recipe for disaster. It looks like you already have a virtualenv for your project, so use that. Bonus points if you specify your dependencies in a requirements.txt file or Pipfile.
I've been trying to follow this guide: https://www.youtube.com/watch?v=x9lKLGTfQFU
and I've come to a problem running the line pip install -r requirements.txt within the virtual environment, this is what happens:
(venv) C:\Users\George\Desktop\Kodi> pip install -r requirements.txt
Collecting gunicorn (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/8c/da/b8dd8deb741bff556db53902d4706774c8e1e67265f69528c14c003644e6/gunicorn-19.9.0-py2.py3-none-any.whl
Collecting pytz (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl
Collecting flask-ask>=0.9.8 (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/6a/f5/d4709ae94584a0b1541e9b52b2d25a8a1bdb6e2da9d6870f23fdd0523a30/Flask-Ask-0.9.8.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\george\appdata\local\temp\pip-install-b3jnkl\flask-ask\setup.py", line 8, in <module>
from pip.req import parse_requirements
ImportError: No module named req
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\george\appdata\local\temp\pip-install-b3jnkl\flask-ask\
I've looked online, upgraded setuptools and ez install but to no avail
i want to install mysqlclient but it returns me
(venv)amir#amg76:~/Documents/Computer/Python/Django/vira/virasciencecom$ pip3 install mysqlclient==1.3.7
Collecting mysqlclient==1.3.7
Using cached mysqlclient-1.3.7.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-c5i8m5ok/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-c5i8m5ok/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-c5i8m5ok/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-c5i8m5ok/mysqlclient/
the same thing happen when i try to install pillow and i use python 3.6 and ubuntu 17.10
can any body help me?
You need to install libmysqlclient-dev or libmariaclient-dev from your distro package repository, depending whether you're using mysql or mariadb respectively.
I'm on Ubuntu 14.04 and have both python 2.7 and 3.4 installed in my system. I was trying to install python's unirest using pip. But it returns the following error.
>> [sudo] pip install unirest
Collecting unirest
Using cached Unirest-1.1.7.tar.gz
Collecting poster>=0.8.1 (from unirest)
Using cached poster-0.8.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-7ur_3q0v/poster/setup.py", line 2, in <module>
import poster
File "/tmp/pip-build-7ur_3q0v/poster/poster/__init__.py", line 29, in <module>
import poster.streaminghttp
File "/tmp/pip-build-7ur_3q0v/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7ur_3q0v/poster/
>>
I also tried the solution here "pip fails to install anything, error: invalid command 'egg_info'", but it did not work.
Please help
I'm getting the following error trying to deploy a Django app. I've been following the tutorial in the documentation at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html. My current hunch is it's because pip is trying to build mod_wsgi from source instead of using a .whl, but that's the extent of my troubleshooting expertise. How can I fix it?
[2015-11-20T02:11:22.515Z] INFO [23704] - [Application update/AppDeployStage0/AppDeployPreHook/03deploy.py] : Activity execution failed, because: Collecting Django==1.8.6 (from -r /opt/python/ondeck/app/requirements.txt (line 1))
Using cached Django-1.8.6-py2.py3-none-any.whl
Collecting mod-wsgi==4.4.7 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
Using cached mod_wsgi-4.4.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-EAwCnb/mod-wsgi/setup.py", line 140, in <module>
'missing Apache httpd server packages.' % APXS)
RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EAwCnb/mod-wsgi
2015-11-20 02:11:22,510 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1
Traceback (most recent call last):
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
install_dependencies()
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 1 (ElasticBeanstalk::ExternalInvocationError)
caused by: Collecting Django==1.8.6 (from -r /opt/python/ondeck/app/requirements.txt (line 1))
Using cached Django-1.8.6-py2.py3-none-any.whl
Collecting mod-wsgi==4.4.7 (from -r /opt/python/ondeck/app/requirements.txt (line 2))
Using cached mod_wsgi-4.4.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-EAwCnb/mod-wsgi/setup.py", line 140, in <module>
'missing Apache httpd server packages.' % APXS)
RuntimeError: The 'apxs' command appears not to be installed or is not executable. Please check the list of prerequisites in the documentation for this package and install any missing Apache httpd server packages.
Sorted it.
apsx is supplied by the httpd-devel package. Use eb ssh to connect then
yum list installed|grep httpd
to see what version of httpd-devel matches the environment. Install with
sudo yum install httpd24-devel
and then
sudo /opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt
to check that it's fixed. If that works then create or edit a (local) file
.ebextensions/01_packages.config
or similar to add that as part of the deployment:
packages:
yum:
httpd24-devel: []