Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-BqMhb7/matplotlib/ #418

Closed
gith77 opened this issue Jan 17, 2018 · 98 comments

Comments

Projects
None yet
@gith77
Copy link

commented Jan 17, 2018

Hi
I try to install the package neuralpy in Python2.7 using this command in terminal

pip install neuralpy

And I got this error message

python setup.py egg_info" failed with error code 1 in /tmp/pip-build-BqMhb7/matplotlib/

Help me pleeeeeeeeeeeeease 👍

@tomrisberil

This comment has been minimized.

Copy link

commented Jan 19, 2018

Hi, following link solved my problem

googleapis/google-cloud-python#3884

You should try pip install --upgrade setuptools.

@Khotso-t

This comment has been minimized.

Copy link

commented Jan 19, 2018

sudo apt-get install python3.6-dev libmysqlclient-dev

@Sanjay-B

This comment has been minimized.

Copy link

commented Jan 19, 2018

This means that your setuptools are out of date.
You can fix this by doing: pip install --upgrade setuptools

@bletham

This comment has been minimized.

Copy link
Contributor

commented Jan 23, 2018

I hope this was successful and thanks everyone for helping out, but I'm going to close this issue since it isn't related to this package.

@bletham bletham closed this Jan 23, 2018

@necygam

This comment has been minimized.

Copy link

commented Jan 26, 2018

I had the same issue with django 2.0, so pip3 instead of pip, the problem may seem that using python 2.7 is impossible hence using python3 instead as typing pip3 install --upgrade setuptools then pip3 install neuralpy
hopefully this help

@slowDee

This comment has been minimized.

Copy link

commented Jan 27, 2018

I am having same issue but after running this command (pip3 install neuralpy) , i get the error message "Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y4/xznzf1fx6q53dqfh71_0lxfm0000gn/T/pip-build-2jgclo3u/neuralpy/"

@Sanjay-B

This comment has been minimized.

Copy link

commented Jan 27, 2018

Did you try pip install —upgrade setuptools ?

@slowDee

This comment has been minimized.

Copy link

commented Jan 27, 2018

yes I did

@NICK-DUAN

This comment has been minimized.

Copy link

commented Feb 9, 2018

ImportError: No module named _winreg

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gGlnv2/pypiwin32/

i have this problem,is that because i use python2.7? i saw someone said the module '_wiinreg' named 'winreg' in python3.

@Mutegeki

This comment has been minimized.

Copy link

commented Feb 12, 2018

i failed work

@rpranshu

This comment has been minimized.

Copy link

commented Feb 16, 2018

For all those people who are facing issues:

write the following
pip install --upgrade setuptools --user python

Using the --user python flag will resolve the error in --upgrade flag and then you can resolve the main error too!

@elgoub

This comment has been minimized.

Copy link

commented Feb 18, 2018

i tink matplotlib is not suported by python3 so try
sudo pip2 install neuralpy

@asignor

This comment has been minimized.

Copy link

commented Feb 22, 2018

I was having a similar problem in Windows, and it was a permissions issue. Since you cannot sudo, the way I found around it was to find my Python folder, right-click then manually edit the permissions in Properties, or open a cmd as an Administrator. (That is a right-click option.)

@lancekrogers

This comment has been minimized.

Copy link

commented Apr 19, 2018

I'm having the same problem with install pymongo on ubuntu

@brandonssmith

This comment has been minimized.

Copy link

commented Apr 19, 2018

Same problem while attempting to install mysqlclient in a digital ocean droplet.

@quelibrio

This comment has been minimized.

Copy link

commented Apr 26, 2018

pip install progressbar33 worked in my case

@ozkalt

This comment has been minimized.

Copy link

commented Jun 9, 2018

For mac users, sudo pip install —upgrade setuptools is worked. Thank you @Sanjay-B

@ghost

This comment has been minimized.

Copy link

commented Jun 12, 2018

I get this error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-3_mzp9vn/mysqlclient/
when I:
pip3 install flask-mysqldb

pip install —upgrade setuptools did not work for me.

@ghost

This comment has been minimized.

Copy link

commented Jun 13, 2018

i get this error:
`Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-30vjp6u3/mysqlclient/setup.py", line 17, in
metadata, options = get_config()
File "/tmp/pip-build-30vjp6u3/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-30vjp6u3/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-30vjp6u3/mysqlclient/
`

@valdekm

This comment has been minimized.

Copy link

commented Jun 21, 2018

On debian these additional packages resolved same issue for me:
apt install libmysqlclient-dev python-mysqldb

seems almost same as @Khotso-t solution
I took it from here:
https://github.com/micheloosterhof/cowrie/blob/master/doc/sql/README.md

@fir0zsid

This comment has been minimized.

Copy link

commented Jul 11, 2018

Try this.It solved my problem
sudo apt-get install libpcap-dev libpq-dev

@aalzooke

This comment has been minimized.

Copy link

commented Jul 11, 2018

You should try the following commends
First do this

sudo pip3 uninstall numpy
sudo pip3 uninstall scipy

Then
sudo apt-get install python3.5-dev libmysqlclient-dev
sudo apt-get install python3-numpy
It should works

@FilipeNMarques

This comment has been minimized.

Copy link

commented Jul 20, 2018

Hello, pip install --upgrade setuptools works for me!

@EtienneCmb EtienneCmb referenced this issue Jul 31, 2018

Closed

Topo Error #18

@miaoyaa

This comment has been minimized.

Copy link

commented Aug 7, 2018

good

@azharisan

This comment has been minimized.

Copy link

commented Aug 28, 2018

Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip_internal\basecommand.py", line 141, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip_internal\commands\install.py", line 391, in run
wheel_cache.cleanup()
File "c:\python27\lib\site-packages\pip_internal\utils\temp_dir.py", line 58, in exit
self.cleanup()
File "c:\python27\lib\site-packages\pip_internal\utils\temp_dir.py", line 81, in cleanup
rmtree(self.path)
File "c:\python27\lib\site-packages\pip_vendor\retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "c:\python27\lib\site-packages\pip_vendor\retrying.py", line 212, in call
raise attempt.get()
File "c:\python27\lib\site-packages\pip_vendor\retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "c:\python27\lib\site-packages\pip_vendor\retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "c:\python27\lib\site-packages\pip_internal\utils\misc.py", line 111, in rmtree
onerror=rmtree_errorhandler)
File "c:\python27\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\python27\lib\shutil.py", line 261, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\python27\lib\shutil.py", line 266, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "c:\python27\lib\site-packages\pip_internal\utils\misc.py", line 119, in rmtree_errorhandler
if os.stat(path).st_mode & stat.S_IREAD:
WindowsError: [Error 5] Access is denied: 'c:\users\proadmin\appdata\local\temp\pip-install-94pot8
\setuptools\setuptools\cli-32.exe'

i get this error ???

@Frocolate

This comment has been minimized.

Copy link

commented Aug 30, 2018

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/08/n4ks_ytx2kggqpp88k9p23bw0000gn/T/pip-install-Ihs9Fg/aiohttp/
i've tried everything nothing is working for me im trying to do pip install discord.py nothing is working i'm quite desperate someone please help

@rpranshu

This comment has been minimized.

Copy link

commented Sep 2, 2018

UPDATE

run the following commands to successfully install it!
pip install --no-cache-dir Package_Name

@zyfccc

This comment has been minimized.

Copy link

commented Dec 18, 2018

Use the Pyenv will solve the problem. https://github.com/pyenv/pyenv

@i-am-dejan

This comment has been minimized.

Copy link

commented Dec 30, 2018

In my case, I had the same problem. I customized the requirements file. There was an older version in there, although I had installed a newer version of matplotlib. After removing the version from the requirements.txt file, everything worked fine. I hope this could help someone.

@SongminYu

This comment has been minimized.

Copy link

commented Dec 30, 2018

In my case, I had the same problem. I customized the requirements file. There was an older version in there, although I had installed a newer version of matplotlib. After removing the version from the requirements.txt file, everything worked fine. I hope this could help someone.

I am a starter facing this problem when installing matplotlib. All the other suggestions above do not work. Could you please explain your method in further detail? Thanks!

@cleyrandal

This comment has been minimized.

Copy link

commented Dec 31, 2018

sudo apt-get install python3.6-dev libmysqlclient-dev

Thanks @Khotso-t, it's worked for me.

I just run

$ sudo apt-get install libmysqlclient-dev

and then

(flask)$ pip install flask_mysqldb==0.2.0

SO:
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

venv:
Click==7.0
Flask==0.12.2
Flask-MySQLdb==0.2.0
itsdangerous==1.1.0
Jinja2==2.10
MarkupSafe==1.1.0
mysqlclient==1.3.14
pkg-resources==0.0.0
Werkzeug==0.14.1

@iagoneresb

This comment has been minimized.

Copy link

commented Jan 12, 2019

Just try,

apt-get install libmysqlclient-dev

then run,

pip install mysqlclient

it will work!!

Thanks man, solved my problem.

@PrakrutiChandak

This comment has been minimized.

Copy link

commented Jan 23, 2019

Try the following
pip install --ignore-installed --no-cache-dir package-name

@z3by

This comment has been minimized.

Copy link

commented Jan 29, 2019

you need these libraries to be installed >>
sudo apt-get install python3 python-dev python3-dev
build-essential libssl-dev libffi-dev
libxml2-dev libxslt1-dev zlib1g-dev
python-pip

@ah-simonkrix

This comment has been minimized.

Copy link

commented Feb 5, 2019

python -m pip install --upgrade pip setuptools wheel

this suggestion breaks pip on Ubuntu 18.0.1LTS

@mrnorr

This comment has been minimized.

Copy link

commented Feb 14, 2019

python -m pip install --upgrade pip setuptools wheel

this suggestion breaks pip on Ubuntu 18.0.1LTS

If you broke your pip3 like I did with this suggestion, fix with the following:
sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall

@UgwakOCrosky

This comment has been minimized.

Copy link

commented Feb 15, 2019

Install python-mysql connector first and you are good to go.

@mirera

This comment has been minimized.

Copy link

commented Feb 24, 2019

mySQLdb is a python interface for mysql, but it is not mysql itself. And apparently mySQLdb needs the command 'mysql_config', so you need to install that first.

Can you confirm that you did or did not install mysql itself, by running "mysql" from the shell? That should give you a response other than "mysql: command not found".

Which linux distribution are you using? Mysql is pre-packaged for most linux distributions. For example, for debian / ubuntu, installing mysql is as easy as
sudo apt-get install mysql-server

mysql-config is in a different package, which can be installed from (again, assuming debian / ubuntu):

sudo apt-get install libmysqlclient-dev

if you are using mariadb, the drop in replacement for mysql, then run
sudo apt-get install libmariadbclient-dev

@jeevasakthits

This comment has been minimized.

Copy link

commented Feb 27, 2019

errorsql
how do i solve this error help to solve

@devlwkyan

This comment has been minimized.

Copy link

commented Mar 1, 2019

screenshot from 2019-03-01 20-13-42
I have this issue every time I try installing zip. How can I fix it?

[I've already tried upgrading setuptools and pip, still doesn't work)

@aliyilmazz

This comment has been minimized.

Copy link

commented Mar 4, 2019

for me, upgrading pip worked.

pip install --upgrade pip

then install the desired library.

@RnnySqrl

This comment has been minimized.

Copy link

commented Mar 11, 2019

Upgraded pip still not working (I'm using pyhton 2.7.12 and pip 19.0.3 ).

@wangyapeng

This comment has been minimized.

Copy link

commented Mar 14, 2019

it`s amazing, so cool

@jaakkomutikainen

This comment has been minimized.

Copy link

commented Mar 25, 2019

My problems was related to permissions. My setuptools was installed using sudo. The following helped

sudo pip uninstall setuptools
pip install setuptools

Then installation worked just fine

@thomasernste

This comment has been minimized.

Copy link

commented Mar 26, 2019

None of the above solutions worked for me, until I found one of the solutions suggested here:

The command is simply as follows:

sudo apt-get install python3-setuptools

@lucas0

This comment has been minimized.

Copy link

commented Mar 26, 2019

@thomasernste solution was what made it work for me :)

@clintonm9

This comment has been minimized.

Copy link

commented Apr 9, 2019

The issue I had was related to /bin/sh: 1: mysql_config: not found

To fix that on a Debian base system I ran sudo apt install libmariadbclient-dev-compat

Hope that can help others :)

@vishalvisd

This comment has been minimized.

Copy link

commented Apr 18, 2019

confusing thread with so many different answer/solution to the problem!

@marksugar

This comment has been minimized.

Copy link

commented Apr 24, 2019

Maybe you can try :
ubuntu: apt-get install -y libkrb5-dev krb5-doc
centos: yum install -y krb5-devel

@PrinceChukz

This comment has been minimized.

Copy link

commented Apr 24, 2019

please help
'pip install git+git://github.com/gunthercox/chatterbot-corpus@master'
Command "python setup.py egg_info" failed with error code 1 in C:\Users\PRINZCHUKZ\AppData\Local\Temp\pip-req-build-jm4uoru6\

@akashdoifode13

This comment has been minimized.

Copy link

commented Apr 25, 2019

Use pip3 instead of pip....It worked for me.

pip3 install neuralpy

@baloda

This comment has been minimized.

Copy link

commented Apr 26, 2019

After all these steps.
you can tryout this : https://pypi.org/project/mysqlclient/

You guys can also check it out. as suggested by the mysqlclient git repo.

which mysql_config
/usr/local/bin/mysql_config

vim /usr/local/bin/mysql_config

go to 112 line number or find libs="$libs -l "

and replace it with this or comment the old one

libs="$libs -lmysqlclient -lssl -lcrypto"

Then tryout the
pip install mysqlclient

@jsrpy

This comment has been minimized.

Copy link

commented May 20, 2019

For Centos (7), use

yum install mariadb-devel solves the problem.

To check which library contains this command? -> use yum provides mysql_config.

@ccysfn

This comment has been minimized.

Copy link

commented May 20, 2019

sudo apt install libcurl4-openssl-dev libssl-dev

SOLVES THIS PROBLEM

@tower111

This comment has been minimized.

Copy link

commented Jun 7, 2019

run
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install --upgrade setuptools
is consolved with me

@NetoSantiago

This comment has been minimized.

Copy link

commented Jun 16, 2019

On debian these additional packages resolved same issue for me:
apt install libmysqlclient-dev python-mysqldb

seems almost same as @Khotso-t solution
I took it from here:
https://github.com/micheloosterhof/cowrie/blob/master/doc/sql/README.md

That solved my problem!! Thank you very much!

@bankauskas

This comment has been minimized.

Copy link

commented Jun 19, 2019

i have the same problem when i try install wirtualenvwrapper

ERROR: Complete output from command python setup.py egg_info:
    ERROR: Download error on https://pypi.org/simple/pbr/: [X509] no certificate or crl found (_ssl.c:3728) -- Some packages may not be found!
    Couldn't find index page for 'pbr' (maybe misspelled?)
    Download error on https://pypi.org/simple/: [X509] no certificate or crl found (_ssl.c:3728) -- Some packages may not be found!
    No local packages or working download links found for pbr
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2s94zqvk/virtualenvwrapper/setup.py", line 7, in <module>
        pbr=True,
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 717, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 782, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 784, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/command/easy_install.py", line 673, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-2s94zqvk/virtualenvwrapper/

SYSTEM: WSL

root@LTKAZ-NM1002:/# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic
root@LTKAZ-NM1002:/# pip -V
pip 19.1.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
root@LTKAZ-NM1002:/# python -V
Python 3.6.8
root@LTKAZ-NM1002:/# sudo pip install setuptools
Requirement already satisfied: setuptools in /usr/local/lib/python3.6/dist-packages (41.0.1)

like you see last version of pip and setuptools. but i still have:
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-2s94zqvk/virtualenvwrapper/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.