command python setup.py egg_info failed - python

I keep getting the errors "pg_config executable not found" and "Command python setup.py egg_info failed with error code 1" when trying to run pip install -r inside a virtual environment. I have done everything that has been suggested on other questions, including running pip install --upgrade setuptools, easy_install -U setuptools and pip install --upgrade Distribute. Is there anything else that can fix this error? The only people getting this error, for my group, are the two of us who are on Windows. Those who are on Mac OS aren't getting this error, only those of us who are on Windows. Screenshot here: http://tinypic.com/r/2drtd38/8

The Gohlke precompiled binaries are usually an easier way to install packages on windows:
psycopg

Related

Pip install of shapely giving "python setup.py egg_info" failed with error code 1 error

I am trying to install shapely 1.5.6 in Windows 10 (python 3). I am getting this strange error.
python setup.py egg_info" failed with error code 1 in c:\users\user1\appdata\local\temp\pip-build-g1iztcx1\shapely
I have tried updating pip but no luck.
What could be the problem?
You can directly download the Shapely Wheel here and run pip install Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl (depending on the name of the package you decided to download).
This worked well for me with Windows 10 and python 3.
In case you are still getting errors with the above solutions just make sure that the shapely wheel you are downloading (here) is the correct one and matching your system's requirements. Make sure you choose the correct 32 bit or 64 bit that also matches the python version (cp37 is for python 3.7). After downloading the file and moving it to your Python directory, run the administrative cmd on Python directory and run:
py -3.7 -m pip install Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl
(Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl is the name of the wheel you decide to download)
Error code 1 means the "Operation is not permitted". Usually when that happens in Linux, you can just use sudo to resolve it. But on windows, you probably have to right-click on cmd and run as administrator to resolve it.
If unable to resolve it then try using easy_install to install the module. Then if still cannot, try updating the setuptools and pip. pip install --upgrade setuptools, pip install --upgrade pip.

Some issues on installing modules with PyCharm

With Mac 10.13.2,PyCharm 2017.3(community edition),Python 3.6.4:
I've been searching high and low but with no luck as whatever I tried didn't work.I have installed Python 3.6 and PyCharm with a success,but it was driving me crazy when I installed the moduletime,PyBluezand openpyxl in the PyCharm.
Can't install time module The answer to the time package is that The time module is part of Python's standard library. It's installed along with the rest of Python, and you don't need to (nor can you!) install it with pip.
The error warning info when I installed the PyBluez module is always the same as follows:
PermissionError: [Errno 13] Permission denied:
'/Users/ringo/Library/Caches/pip/wheels/e7/40/9d/b772a3cf2ca121e87a06eabe9483271816581dec7c772272d3'
When it occurred,I changed to install it in the terminal app with the command sudo pip3 install PyBluez
The error info:
Failed building wheel for PyBluez
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import
setuptools,
tokenize;file='/private/tmp/pip-build-umoukn9i/PyBluez/setup.py';f=getattr(tokenize,
'open', open)(file);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, file, 'exec'))" install
--record /tmp/pip-53lcxusy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-umoukn9i/PyBluez/
Install openpyxl:
After I installed openpyxl in the terminal app with sudo pip3 install openpyxl,I re-open a PyCharm project,but the module isn't in the packege list.When I import openpyxl and run the project, the info ModuleNotFoundError: No module named 'openpyxl'occurs.
If I install it with PyCharm,the error message is the same as that when install PyBluez
How to solve the issues? It requires me to swipe before I can continue so it slows me down... I will be really grateful if you could share some right method that I should look into. Thanks.
Add further infomation:
Cannot import Bluetooth in Python 3 (OSX)With this question asked by Carl Bratt,I found the answer:
This is the closed OS X import issue #108 on GitHub:
http://github.com/karulis/pybluez/issues/108
It's actually quite an old issue.
One thing the author suggested you might do is remove your current
installation and install the GitHub repo using pip:
git clone https://github.com/karulis/pybluez.git
pip install -e pybluez
Another command you can use:
pip3 install --upgrade git+https://github.com/rgov/pybluez.git#egg=pybluez
try to install anaconda3 instead of python itself
https://www.anaconda.com/download/#macos
I'm using anaconda for python

Egg_info error when installing rpy2 windows 10

I want to install rpy2 and next install anaconda with spyder to use python.
I tried this command
py -m pip install rpy2
but it gave me this error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Robert\AppData\Local\Temp\pip-build-o27u4aog\rpy2\
I tried to install unroll as well with similar pip command and it gave me similar error
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Robert\AppData\Local\Temp\pip-build-nyfqo09i\uroll\
Like suggested for example here I succesfully did
py -m pip install --upgrade setuptools
and
py -m pip install ez_setup
but nothing helped. I had to unistall anaconda to --upgrade setuptools looking foward to install rpy2 but now I dont know what to do more.
I am using windows 10, R 3.2.5 and python 3.5.
Any suggestions?
Use precompiled binaries.
See: http://rpy2.readthedocs.io/en/default/overview.html#microsoft-s-windows-precompiled-binaries
The main page for rpy2 will be updated to indicate that pip install is not the easiest way to install rpy2 on Windows.

pyautogui and Mac OSX: is xcode necessary?

When trying to install pyautogui I received the following error message:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-dq2l07no/pyobjc-core
This exact problem is discussed in this thread were installing xcode seems to fix it but it's a rather large file. is it absolutely necessary to install Xcode? is there a workaround?
thanks
According to the installation instructions here https://pyautogui.readthedocs.io/en/latest/install.html you must first run:
pip3 install pyobjc-core
pip3 install pyobjc
...before you can run pip3 install pyautogui. (Or use pip instead of pip3 if you are installing for Python 2.)

Django installation in windows command line

I've done below command in command line in windows:
python.exe setup.py install
It was running then came up with this error:
error: invalid command 'install_lib' (no class 'install_lib' in module 'distutil
s.command.install_lib')
Can anyone pinpoint what it is?
Download and install setuptools for windows and then run the command.
Seems like you don't have setuptools installed. You can easily install it with the ez_setup.py. After you did that, I recommend you to install pip with easy_install pip (easy_install comes with setuptools), then installing django is just: pip install django.

Categories