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-7SrToZ/gitsome/ #4

Closed
capaj opened this issue May 9, 2016 · 35 comments
Labels

Comments

@capaj
Copy link

capaj commented May 9, 2016

Update by donnemartin on 2019-04-07:

gitsome now supports Python 3.7, see #160.

PyPI: https://pypi.org/project/gitsome/


I get this error when I run:

sudo -H pip install gitsome
Collecting gitsome
  Downloading gitsome-0.4.0.tar.gz (278kB)
    100% |████████████████████████████████| 286kB 2.8MB/s 
    Complete output from command python setup.py egg_info:
    gitsome currently requires Python 3.4+

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7SrToZ/gitsome/

What am I doing wrong?
I am on ubuntu 16.04

@donnemartin
Copy link
Owner

gitsome currently requires Python 3.4+

What version of python are you running?

$ python --version

@capaj
Copy link
Author

capaj commented May 9, 2016

That prints out
Python 3.5.1+

But I installed pip on Python 2.7, because when I try to install it it gives me:
Requirement already up-to-date: pip in /usr/local/lib/python2.7/dist-packages

I will try to get the newer python, thanks for your help.

@pacuna
Copy link

pacuna commented May 9, 2016

I had the same problem on OSX and

sudo pip3 install git+https://github.com/donnemartin/gitsome.git

Solve my issue (I have both python versions installed).

@capaj
Copy link
Author

capaj commented May 9, 2016

@pacuna thanks I solved it in the same way:

sudo -H pip3 install gitsome

@capaj capaj closed this as completed May 9, 2016
@donnemartin
Copy link
Owner

Great! I'll reopen this and investigate if there's anything I can do on my end and so others who run into this issue can more easily find this ticket.

@donnemartin donnemartin reopened this May 9, 2016
@donnemartin
Copy link
Owner

For now, I added the following based on the discussions in this ticket. I'll keep this open for a little longer.

https://github.com/donnemartin/gitsome#pip3

pip3

Depending on your system, you might need to run pip3, possibly with the -H flag:

$ sudo -H pip3 install gitsome

See this ticket for more details.

@jashgala
Copy link
Contributor

I faced a similar issue. Turns out I had Python 2.7 and 3.4 installed. However the pip command was configured for Python 2.7. So I had to install pip3 (since I had a fresh install of Linux on my machine):

sudo apt-get install python3-pip

Then I used pip3 in all places where pip was mentioned in the installation instructions:

sudo pip3 install -e .
sudo pip3 install -r requirements-dev.txt

These fixed it for me.

@donnemartin
Copy link
Owner

@jashgala thanks for that note...how do you feel about a pull request :) Might be helpful to update the dev install section, maybe something like this?

https://github.com/donnemartin/gitsome#pip3

@donnemartin
Copy link
Owner

Updated README with #22.

@coder09
Copy link

coder09 commented Aug 7, 2016

As instructed in Readme I installed pip3
$ sudo apt-get install python3-pip
but this installs pip3 v8.1.1, I don't know why but this seems to be causing the problem.
Upgrading pip3 to v8.1.2 with python v3.5 did it for me, on my Ubuntu v16.04
$ sudo pip3 install --upgrade pip

@DarthFudd
Copy link

Issue #4 is closed now, and I eventually got the install to work OK. Just for feedback, however, here's an annotated summary of what happened to me. I got a few messages that may be of interest. This is on a recent install of Linux Mint.


$ git clone https://github.com/donnemartin/gitsome.git
$ cd gitsome/
$ pip install -e
The program 'pip' is currently not installed. You can install it by typing:
sudo apt install python-pip

OK, install 'python-pip' then, as instructed.

$ sudo apt install python-pip
The following additional packages will be installed:
  python-pip-whl
The following NEW packages will be installed:
  python-pip python-pip-whl
  (worked OK)

Seemed to work OK, but see ahead for problems.

$ pip install -e .
Obtaining file:///home/wdye/demos/gitsome
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named setuptools    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/wdye/demos/gitsome/
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Upgrade something that I just installed? Um, OK. I'll run the upgrade command then.

$ pip install --upgrade pip
Collecting pip
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Weird. I did what the message recommended, but the message keeps recommending it. Looked back at the gitsome instructions and decided to try pip3 instead of pip.

$ sudo apt-get install python3-pip
The following NEW packages will be installed:
  python3-pip
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64
  python3-pip all 8.1.1-2ubuntu0.2 [109 kB]
Selecting previously unselected package python3-pip.
Unpacking python3-pip (8.1.1-2ubuntu0.2) ...
Setting up python3-pip (8.1.1-2ubuntu0.2) ...

Seemed to work I guess.

$ pip3 install -e .
Obtaining file:///home/wdye/demos/gitsome
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named 'setuptools'
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/wdye/demos/gitsome/
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I'm not sure if that's a total failure or just some warning that can be ignored. Decided to try running the subsequent command in the gitsome instructions.

$ pip3 install -r requirements-dev.txt
Collecting codecov>=1.3.3 (from -r requirements-dev.txt (line 1))
  Downloading codecov-2.0.5-py2.py3-none-any.whl
Collecting flake8>=2.4.1 (from -r requirements-dev.txt (line 2))
  Downloading flake8-3.0.4-py2.py3-none-any.whl (64kB)
Collecting gitchangelog>=2.2.1 (from -r requirements-dev.txt (line 3))
  Downloading gitchangelog-2.4.1.tar.gz (42kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named 'setuptools'
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
/tmp/pip-build-ryqfhpdw/gitchangelog/ You are using pip version 8.1.1,
however version 8.1.2 is available.  You should consider upgrading via
the 'pip install --upgrade pip' command.

That can't be good. Try upgrading again?

$ pip install --upgrade pip
Requirement already up-to-date: pip in /home/wdye/.local/lib/python2.7/site-packages

Maybe the old 'pip' is confusing 'pip3' somehow. Try removing it.

$ sudo apt remove python-pip
The following packages will be REMOVED:
  python-pip
Removing python-pip (8.1.1-2ubuntu0.2) ...

OK, now re-try the first install command from the instructions.

$ pip3 install -e .
Obtaining file:///home/wdye/demos/gitsome
Could not import setuptools which is required to install from a source distribution.
Please install setuptools.

Ugh. Why didn't the gitsome instructions mention that part? Oh, well. Try installing setuptools. I'm guessing that's a pip3 thing, not apt-get.

$ pip3 install setuptools
Collecting setuptools
  Downloading setuptools-28.6.1-py2.py3-none-any.whl (471kB)
Installing collected packages: setuptools
Exception:
Traceback (most recent call last):
[...]
PermissionError: [Errno 13] Permission denied:
  '/usr/local/lib/python3.5/dist-packages/easy_install.py'

I guess it needs sudo powers.

$ sudo pip3 install setuptools

The directory '/home/wdye/.cache/pip' or its parent directory is not owned by the
current user and caching wheels has been disabled. check the permissions and owner
of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting setuptools
  Downloading setuptools-28.6.1-py2.py3-none-any.whl (471kB)
Installing collected packages: setuptools
Successfully installed setuptools-28.6.1

I see a success message, but also a warning about needing sudo -H. Well, try it again with sudo -H then.

$ sudo -H pip3 install setuptools
Requirement already satisfied (use --upgrade to upgrade): setuptools in
/usr/local/lib/python3.5/dist-packages
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

It's my old friend the 'pip install --upgrade pip' message! OK, how about we try it with sudo powers then.

$ sudo -H pip install --upgrade pip
sudo: pip: command not found

Er, how about we try it with pip3 instead of pip?

$ sudo -H pip3 install --upgrade pip
Collecting pip
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed pip-8.1.2

Seems like some warnings still, but I see 'Successfully' at the end, so let's try the original command.

$ pip3 install -e .
  [...]
    error: could not create
      '/usr/local/lib/python3.5/dist-packages/numpydoc': Permission denied

Try again with sudo, I guess.

$ sudo pip3 install -e .

(Warnings about the directory '~/.cache/pip')
[...] If executing pip with sudo, you may want sudo's -H flag.
(Messages which seem to indicate that a lot of other installs worked OK.)

OK, OK, sudo -H, not just sudo.

$ sudo -H pip3 install -e .
[...]
Installing collected packages: gitsome
  Running setup.py develop for gitsome
Successfully installed gitsome-0.6.0

W00T! It worked. I think. Maybe. Try the next command in the instructions.

$ pip3 install -r requirements-dev.txt
[...]
error: could not create
  '/usr/local/lib/python3.5/dist-packages/coverage': Permission denied

Fine. Give sudo -H powers to it. Give it to everyone. You get a sudo -H. And you. And YOU. EVERYBODY GETS A SUDO -H.

$ sudo -H pip3 install -r requirements-dev.txt
(Lots of messages)
Successfully installed [...]

Looks like it finally worked.

@donnemartin
Copy link
Owner

Hi @DarthFudd, sorry you ran into so many issues installing on Linux Mint, really appreciate the play-by-play, I think this will be helpful if others run into a similar issue.

I'll see if I can try to update the install instructions based on your feedback...or I'd be happy to look at a pull request if you're interested :)

You get a sudo -H. And you. And YOU. EVERYBODY GETS A SUDO -H.

lol!

@wenpengfei
Copy link

apt-get install libcurl4-openssl-dev

@megh500
Copy link

megh500 commented Apr 19, 2017

can you help me?i have this error in windows 64 bit. even though i installed Anaconda 3. what should i do?Command "python setup.py egg_info" failed with error code 1 in C:\Users\mehdi\AppData\Local\Temp\pip-build-qge995dn\pydot\

@sandunr
Copy link

sandunr commented Nov 9, 2017

Installing libcurl with:
sudo apt-get install libcurl4-openssl-dev
and then pairix with:
sudo apt-get install zlib1g-dev
solved my issue.

@g10guang
Copy link

brew install mysql-connector-c # macOS (Homebrew)

github mysqlclient it says you should install a >software for mysql-dev first.

I use ubuntu and I met the similar problem. I solve it after install the software it notices.

@blank-black
Copy link

I get the error the same like you.
But my python version is 3.6.1.
I try to do this

sudo pip3 install git+https://github.com/donnemartin/gitsome.git

but it say


Collecting git+https://github.com/donnemartin/gitsome.git
  Cloning https://github.com/donnemartin/gitsome.git to /private/tmp/pip-oq2nrb1c-build
    Complete output from command python setup.py egg_info:
    gitsome currently requires Python 3.4 or 3.5

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

and I try

sudo -H pip3 install gitsome

but it say


Collecting gitsome
  Downloading gitsome-0.7.2.tar.gz (314kB)
    100% |████████████████████████████████| 317kB 724kB/s
    Complete output from command python setup.py egg_info:
    gitsome currently requires Python 3.4 or 3.5

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-hj45gqu_/gitsome/

What should I do?
Thanks a lot!

@fasolens
Copy link

fasolens commented Feb 28, 2018 via email

@Collen-Gura
Copy link

Using Windows 10, when I try to install matplotlib through command "pip3 install matplotlib", I am getting the following error message: Command "python setup.py egg_info" failed with error code 1 in C:\Users\USERPC~1\AppData\Local\Temp\pip-install-vc3pb4nv\matplotlib"
What should I do? Please help. Collen Gura

@venkateshchary
Copy link

while installing boilerpipe with pip install boilerpipe-py3
i am unable installing the package
it's getting error as a
Command "python setup.py egg_info" failed with error code 1 in C:\Users\venky~1\AppData\Local\Temp\pip-install-i66tix00\boilerpipe-py3\

@bzamanloo
Copy link

I get the same error when writing:
sudo -H pip3 install rpy2==2.3.0
I updated my pip, installed pip3 and installed gitsome but it does not seem t work.

@ghost
Copy link

ghost commented Aug 27, 2018

@blank-black im with the same issue :/

@techvt518
Copy link

@blank-black same issue

@donnemartin
Copy link
Owner

Hi all, check out #160, gitsome now supports Python 3.7.

Uploaded to PyPI: https://pypi.org/project/gitsome/

@ch21
Copy link

ch21 commented Jul 27, 2019

(mac)I fixed this problem by using this:

pip install psycopg2-binary

found this in the documents:
http://initd.org/psycopg/docs/install.html

@wintzarchihtun
Copy link

hello, I have the same error like this in window. How can I solved? Please help me.

@youpip
Copy link

youpip commented Mar 21, 2020

I don't know why, but for me it works when writing:
conda install cartopy
conda install geopandas
conda install ...

@mobinalhassan
Copy link

Easy solution step by step work for me and work for almost everyone!
1st You need to install apt-get package
sudo apt-get install mysql-server
sudo apt-get install libmysqlclient-dev
sudo apt-get install libmariadbclient-dev
2nd you need to install pip package
pip install mysqlclient
then you are ready to install any package which have problem of

python setup.py egg_info Check

pip install your-package-name

@wintzarchihtun
Copy link

wintzarchihtun commented Apr 8, 2020 via email

@NIravMeghani
Copy link

image
any solution ?

@mmarzluc
Copy link

I have the same error as NIravMeghani:

"ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."

Do you know how to solve the issue? Thank you in advance.

@mobinalhassan
Copy link

I have the same error as NIravMeghani:

"ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."

Do you know how to solve the issue? Thank you in advance.

#4 (comment)

@MohammedNagdy
Copy link

@andyprabhakar
Copy link

I am facing the error while installing hdbscan

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-047g1g8c/hdbscan/

@sumanth-lingappa
Copy link

sumanth-lingappa commented May 3, 2023

@donnemartin, I am facing the below error. How can I fix it?

Error

  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in feedparser setup command: use_2to3 is invalid.
      [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.

EDIT: I had to fix the setup.py and install it. I have created a PR: #205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests