Egg_info error when installing rpy2 windows 10 - python

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.

Related

Pygame install issue: Unable to establish a new connection error [duplicate]

I am trying to use command pip install pygame in cmd, but there is error.
The error is shown as follows:
C:\Users\Administrator>pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/80/2c/3a52e7e9c097229b026b4efbe6711c600f3a84ffdc5f11fd9e7f8932368e/pygame-1.9.6-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I follow the instruction in the error but still cannot solve the problem. And I also found whatever "pip" command cannot be installed correctly.
You can install the package as Administrator, by following these steps:
1.Right click on the Command Prompt icon
2.Select the option: Run This Program As An Administrator
3.Run the command: pip install pygames
Instead of you can use the command
pip install --user pygames
The other answers didn't work for me. I checked this site and made sure that pip, setuptools, and ez_setup were installed at the latest versions. Still no luck. Finally, I discovered the magic words here:
pip install pygame --pre
Per this, --pre option tells pip to include pre-release versions of packages when searching for the latest version. Apparently that's what's needed as of this writing (2023-02-08).
(Thanks to accddd)
check if Pip was installed correctly by opening a command prompt and entering the following command:
pip -V
output should be like:
pip 18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)
if pip is not install copy this file link and save it to setup.py
now open cmd and run script by typing
python setup.py
for more details check link.
when pip in install correctly install run this commond
python -m pip install -u pygame --user
For this, you have to install pygame package from the cmd (on Windows) or from the terminal (on mac). Just type pip install pygame.If it doesn't work for you, then try using this statement pip3 install pygame. If it is still showing an error then you don't have pip installed on your device and try installing pip first.

How to solve the "pip install pygame" issue?

I am trying to use command pip install pygame in cmd, but there is error.
The error is shown as follows:
C:\Users\Administrator>pip install pygame
Collecting pygame
Using cached https://files.pythonhosted.org/packages/80/2c/3a52e7e9c097229b026b4efbe6711c600f3a84ffdc5f11fd9e7f8932368e/pygame-1.9.6-cp37-cp37m-win32.whl
Installing collected packages: pygame
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\program files (x86)\\python37-32\\Lib\\site-packages\\pygame'
Consider using the `--user` option or check the permissions.
You are using pip version 18.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I follow the instruction in the error but still cannot solve the problem. And I also found whatever "pip" command cannot be installed correctly.
You can install the package as Administrator, by following these steps:
1.Right click on the Command Prompt icon
2.Select the option: Run This Program As An Administrator
3.Run the command: pip install pygames
Instead of you can use the command
pip install --user pygames
The other answers didn't work for me. I checked this site and made sure that pip, setuptools, and ez_setup were installed at the latest versions. Still no luck. Finally, I discovered the magic words here:
pip install pygame --pre
Per this, --pre option tells pip to include pre-release versions of packages when searching for the latest version. Apparently that's what's needed as of this writing (2023-02-08).
(Thanks to accddd)
check if Pip was installed correctly by opening a command prompt and entering the following command:
pip -V
output should be like:
pip 18.0 from c:\users\administrator\appdata\local\programs\python\python37\lib\site-packages\pip (python 3.7)
if pip is not install copy this file link and save it to setup.py
now open cmd and run script by typing
python setup.py
for more details check link.
when pip in install correctly install run this commond
python -m pip install -u pygame --user
For this, you have to install pygame package from the cmd (on Windows) or from the terminal (on mac). Just type pip install pygame.If it doesn't work for you, then try using this statement pip3 install pygame. If it is still showing an error then you don't have pip installed on your device and try installing pip first.

Can't install pygame with pip for Python 3.7 - Command "python setup.py egg_info" failed with error code 1

I get the below error when trying to install pygame with pip:
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\danie\AppData\Local\Temp\pip-install-8zxzuqef\pygame\
I don't know what this means, and when i look up in other places to tells me to fix my environment variables. But it still doesn't work.
Update: Pygame 1.9.4 has been released and you can download and install it with pip again. In Windows I recommend installing it with: py -3.7 -m pip install pygame
There are no official precompiled pygame packages for Python 3.7 available yet, so pip install pygame doesn't work, but you can get a pygame wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Download pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl if you have a 64-bit Python version or pygame‑1.9.3‑cp37‑cp37m‑win32.whl if you have a 32-bit version. Then open the command-line, navigate to the directory that contains the wheel file and install it with pip:
py -3.7 -m pip install pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl
This solution works only in Windows, so users with other operating systems have to wait and use Python 3.6.
On debian
sudo apt-get install python3-pygame
works.
Try :
py -3.7 -m pip install pygame

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.

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.)

Categories