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 C:\Users\sanja\AppData\Local\Temp\pip-build-ppc44asr\googleapis-common-protos\ #3884

Closed
sbhadr opened this issue Aug 26, 2017 · 27 comments
Assignees

Comments

@sbhadr
Copy link

sbhadr commented Aug 26, 2017

  1. Windows 10
  2. Python 3.6.2
  3. N/A
  4. Stacktrace
C:\Users\sanja\Desktop\Sapphire\api>pip install --upgrade gcloud
Collecting gcloud
  Downloading gcloud-0.18.3.tar.gz (454kB)
    100% |████████████████████████████████| 460kB 1.0MB/s
Requirement already up-to-date: httplib2>=0.9.1 in c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages (from gcloud)
Collecting googleapis-common-protos (from gcloud)
  Using cached googleapis-common-protos-1.5.2.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\sanja\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\__init__.py", line 10, in <module>
        from setuptools.extern.six.moves import filter, filterfalse, map
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
        from pkg_resources.extern import VendorImporter
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3017, in <module>
        @_call_aside
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3003, in _call_aside
        f(*args, **kwargs)
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 3045, in _initialize_master_working_set
        dist.activate(replace=False)
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2577, in activate
        declare_namespace(pkg)
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2151, in declare_namespace
        _handle_ns(packageName, path_item)
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2091, in _handle_ns
        _rebuild_mod_path(path, packageName, module)
      File "c:\users\sanja\appdata\local\programs\python\python36-32\lib\site-packages\pkg_resources\__init__.py", line 2120, in _rebuild_mod_path
        orig_path.sort(key=position_in_sys_path)
    AttributeError: '_NamespacePath' object has no attribute 'sort'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\sanja\AppData\Local\Temp\pip-build-ppc44asr\googleapis-common-protos\
  1. Refer to #6
  2. pip install gcloud or pip install --upgrade gcloud

Looking for a solution,
Thanks in advance.

@sbhadr
Copy link
Author

sbhadr commented Aug 26, 2017

Side note: Also occurs when installing pyrebase through pip (pip install pyrebase).

@dhermes
Copy link
Contributor

dhermes commented Aug 26, 2017

@Sanjay-B You have an out of date version of setuptools, sorry for the inconvenience (and hard to understand error).

Simply pip install --upgrade setuptools

If it doesn't work, we can re-open and discuss. Pre-emptively closing since the issue seems clear.

@dhermes
Copy link
Contributor

dhermes commented Oct 3, 2017

For anyone who comes here, see #2990 (comment).

@dawong8
Copy link

dawong8 commented Oct 31, 2017

When I run pip install --upgrade setuptools, I get

Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
    copytree(src, real_dst, symlinks=True)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
    raise Error, errors
Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/var/folders/7n/w1bdv55j4tv4lqb71wk2xv0c0000gn/T/pip-gukfzS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]

What happened? :(

@dhermes
Copy link
Contributor

dhermes commented Oct 31, 2017

You can't overwrite some packages owned by system Python on OS X (i.e. the python binary that lives in /System/Library/Frameworks/Python.framework/Versions/2.7/..., which you can see if you ask for sys.executable in the interpreter). Using system Python on OS X is not really a good idea, because it can't be updated. Instead, I recommend one of the following approaches (in this order):

  • using pyenv so you can manage your own Python install
  • installing directly with .pkg files from python.org
  • using conda / Anaconda / Miniconda
  • using Homebrew Python

@ApsRajput
Copy link

hello dawong8,
its permission problem, try 'sudo pip install --upgrade setuptools'

@ghost
Copy link

ghost commented Jan 19, 2018

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

@fishruti
Copy link

Hello guys,

The problem is ONLY with Python 3.7 . When I moved back to Python 3.6 I was able to install !! :D :D

@ellisdyke
Copy link

(I'm using/have only eve4r used 3.6, but am still unable to install)

@rahul6612

This comment has been minimized.

@srish
Copy link

srish commented Feb 14, 2018

@rahul6612 Please mind your language. Contributors and users of these libraries are not sitting idle and their purpose is not solely to support your problems. Because people all over the world speaking and writing different languages interact on this thread does not mean that you can get away with using verbal abuse. Please maintain an etiquette next time and have patience when seeking help in a public forum.

@sbhadr
Copy link
Author

sbhadr commented Feb 14, 2018

Keep this on topic. Meant as a solution for others having this problem. Be mindful.

@ghost
Copy link

ghost commented Feb 15, 2018

Hello Geeks,

I am also receiving the same error:
C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Scripts>pip ins
tall robotframework-sudslibrary
Collecting robotframework-sudslibrary
Using cached robotframework-sudslibrary-0.8.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ADMINI1\AppData\Local\Temp\pip-build-ygs6x3qj\robotframewo
rk-sudslibrary\setup.py", line 8, in
from ez_setup import use_setuptools
File "C:\Users\ADMINI
1\AppData\Local\Temp\pip-build-ygs6x3qj\robotframewo
rk-sudslibrary\src\ez_setup.py", line 106
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMINI~1
\AppData\Local\Temp\pip-build-ygs6x3qj\robotframework-sudslibrary\

setup-tools package has latest and up to date in system, any pointers?

@chemelnucfin
Copy link
Contributor

@sparimi1
Hello, you are probably looking for this library robotframework-sudslibrary

@Ayushverma8
Copy link

Please specify for CentOS as well . :-(

@srcolinas
Copy link

Please solve this issue, I am using Ubuntu and the command: pip install google-cloud-dataflow
produces the following error:
pip install google-cloud-dataflow==2.2.0
Collecting google-cloud-dataflow==2.2.0
Using cached google-cloud-dataflow-2.2.0.tar.gz
Collecting apache-beam[gcp]==2.2.0 (from google-cloud-dataflow==2.2.0)
Using cached apache-beam-2.2.0.zip
Complete output from command python setup.py egg_info:

Error compiling Cython file:
------------------------------------------------------------
...

    For performance reasons, doesn't actually impose an ordering
    on unequal values (always returning 1).
    """
    if type(left) is not type(right):
      return cmp(type(left), type(right))
            ^
------------------------------------------------------------

apache_beam/utils/windowed_value.py:83:13: undeclared name not builtin: cmp
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-lfsu689y/apache-beam/setup.py", line 173, in <module>
    'apache_beam/utils/windowed_value.py',
  File "/home/srcolinas/anaconda3/envs/gcp_test27/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1039, in cythonize
    cythonize_one(*args)
  File "/home/srcolinas/anaconda3/envs/gcp_test27/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1161, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: apache_beam/utils/windowed_value.py
Compiling apache_beam/coders/stream.pyx because it changed.
Compiling apache_beam/runners/worker/statesampler.pyx because it changed.
Compiling apache_beam/coders/coder_impl.py because it changed.
Compiling apache_beam/metrics/execution.py because it changed.
Compiling apache_beam/runners/common.py because it changed.
Compiling apache_beam/runners/worker/logger.py because it changed.
Compiling apache_beam/runners/worker/opcounters.py because it changed.
Compiling apache_beam/runners/worker/operations.py because it changed.
Compiling apache_beam/transforms/cy_combiners.py because it changed.
Compiling apache_beam/utils/counters.py because it changed.
Compiling apache_beam/utils/windowed_value.py because it changed.
[ 1/11] Cythonizing apache_beam/coders/coder_impl.py
[ 2/11] Cythonizing apache_beam/coders/stream.pyx
[ 3/11] Cythonizing apache_beam/metrics/execution.py
[ 4/11] Cythonizing apache_beam/runners/common.py
[ 5/11] Cythonizing apache_beam/runners/worker/logger.py
[ 6/11] Cythonizing apache_beam/runners/worker/opcounters.py
[ 7/11] Cythonizing apache_beam/runners/worker/operations.py
[ 8/11] Cythonizing apache_beam/runners/worker/statesampler.pyx
[ 9/11] Cythonizing apache_beam/transforms/cy_combiners.py
[10/11] Cythonizing apache_beam/utils/counters.py
[11/11] Cythonizing apache_beam/utils/windowed_value.py

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lfsu689y/apache-beam/

I have upgrated setuptools and tried on python 3.6 and python 2.7 using conda as the manager of virtual environments. Nothing works! when I try to do pip install apache-beam I get the same error.

@chemelnucfin
Copy link
Contributor

chemelnucfin commented Apr 4, 2018

@srcolinas do you need dataflow 2.2.0? I just tested and had no problems with installing the newest version, but I did encounter an error on 2.2.0

@srcolinas
Copy link

No, the latest version would be great. However, I got the following when I do pip install google-cloud-dataflow

Collecting google-cloud-dataflow
Using cached google-cloud-dataflow-2.4.0.tar.gz
Collecting apache-beam[gcp]==2.4.0 (from google-cloud-dataflow)
Could not find a version that satisfies the requirement apache-beam[gcp]==2.4.0 (from google-cloud-dataflow) (from versions: 0.6.0, 2.0.0, 2.1.0, 2.1.1, 2.2.0)
No matching distribution found for apache-beam[gcp]==2.4.0 (from google-cloud-dataflow)

Which is why I tried 2.2.0
(Thanks for your help)

@ghost
Copy link

ghost commented Apr 5, 2018

Hi guys!
I need to run "pip install matplotlib" from a Windows command prompt to install matplotlib.
I need that because in python I should run the following:

import matplotlib.pyplot as plt
plt.plot([0, 0.25, 1], [0, 1, 0.5], "r-")
plt.plot([0.25, 0.5, 1.5, 1], [0.5, 1.0, 0.5, 0], "go")
plt.show()

But "pip install matplotlib" i cmd leads to an error code 1, i.e. there is no permission.
error_code_1
error_code_1 2

I did follow previous recommendations for solving this but no luck.

I need help

Thanks in advance!

@sbhadr
Copy link
Author

sbhadr commented Apr 17, 2018

What Python version are you using? What Python version does matplotlib support?

@fishruti
Copy link

@candscientecon In windows, you need to right click on the cmd icon and choose 'run as admin'. sudo does not work in windows.

@ashton-reed
Copy link

Did you ever find a solution for this? I'm currently having the same problem. @candscientecon

@ghost
Copy link

ghost commented May 2, 2018

Hi guys
@Sanjay-B Im using Python 3.7 for win 64 bit and matplotlib supports every version, so i tried degrade my Python and vice versa but no luck.
@fishruti I tried that!
@Ashton08 no solutions. But it worked on Spyder through Anaconda, since Anaconda has the most packages installed.

@tseaver
Copy link
Contributor

tseaver commented May 2, 2018

@srcolinas In spite of the appearance given by its name, google-cloud-dataflow is not maintained in this repository. Please use https://cloud.google.com/dataflow/support for issues relating to that API / wrapper library.

@candscientecon Your issue is with matplotlib, or else with pip / setuptools. We can't really help you with it here.

@ghost
Copy link

ghost commented May 2, 2018

@tseaver I came up with the idea that I had installed Python wrongly e.g. Pipy or somthing wrong with my path from packages to python.
Or Python is install at a place where windows cant make changes through cmd?

@tseaver
Copy link
Contributor

tseaver commented May 2, 2018

@candscientecon For help with matplotlib, please see https://matplotlib.org/#need-help. For help with setuptools, please see https://github.com/pypa/setuptools

@nimeshneema
Copy link

@rahul6612 Please be conscious of your language and show respect to the community. I have already reported abuse to GitHub for your user account.

@googleapis googleapis locked and limited conversation to collaborators May 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests