Can't install scimath in Python 2.7 to custom directory - python-2.7

I'm trying to install scimath 4.1.2 with pip 2.7.14 to a custom directory. There are two dependencies, that I have installed in a higher version than probably needed (but it's impossible to downgrade those):
numpy==1.9.3
matplotlib==2.0.2
Now, I'm getting the following error when trying to install scimath:
Processing /backup/pip/packages/scimath-4.1.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-req-build-QUsQtn/setup.py", line 9, in
import numpy.distutils.core
ImportError: No module named numpy.distutils.core
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-QUsQtn/
I'm not sure how I can solve this problem.

The solution was quite simple and embarrassing: I forgot to export PYTHONPATH before running pip. With that variable, it was working.

Related

Getting "encoding' is an invalid keyword argument for this function" On Installing pyautogui via PIP

I'm getting this error when I'm trying to install "pyautogui" library to python. Please find the details below -
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "################\pip-install-pmckiy\pygetwindow\setup.py", line 10, in <module>
with open('README.md', 'r', encoding='utf-8') as fh:
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in c:\################\pip-install-pmckiy\pygetwindow\
Python Version - 2.7.12
Things I have already tried -
1.) I have upgraded the pip, current version - pip 19.1.1
2.) I also followed the steps as given in this another answer
"pip install unroll": "python setup.py egg_info" failed with error code 1
3.) Since this is installation I have no control over the code, also I tried to search for this error in the files but no luck, hence below URL also did not help me much -
Is 'encoding is an invalid keyword' error inevitable in python 2.x?
4.) I tried installing setuptools as well but it is also not helping
This is a bug in pygetwindow, already reported but not resolved: https://github.com/asweigart/PyGetWindow/issues/9
The problem is that in Python 3 open has parameter encoding, but not in Python 2. That is, the code now requires Python 3.

How to install nest module from a .tar.gz source file

I'm trying to install nest with the command "pip install nest-2.16.0.tar.gz" but get an error as shown in the attached picture. The tar file is in the correct directory.
"
ERROR:Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "", line 1, in
IOError: [Errno 2] No such file or directory: 'c:\users\steph506\appdata\local\temp\pip-req-build-ufft6c\setup.py'
ERROR: Command "python setup.py egg_info" failed with error code 1 in ''c:\users\steph506\appdata\local\temp\pip-req-build-ufft6c\'
"
The PATH variable is set to C:...Python27. Does anyone know what is causing this error, and how I can install the package from the file I have?
Thank you!
BACKGROUND: I specifically need the 2.16.0 version of the nest module. When I do "pip install nest" it finds a 1.* version instead. When I do "pip install nest==2.16.0" it says it can't find that version. So instead I downloaded the nest-2.10.0.tar.gz file directly and I tried to install from that file. I also tried upgrading pip to make sure I had the latest available version.

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-dxjZrU/pyproj/ when installing 'geopandas'

Before going to the topic, my computer information:
OS: Debian jessie, Python version: 2.7
I need to install the module "geopandas" for a project i am working on. The problem is that when i tried, i receive the following error:
root#debian:~# pip install geopandas
Collecting geopandas
Using cached https://files.pythonhosted.org/packages/0a/0e/8ae74743ed7915ddb7d70cc8dfa8fc0b9b9cc81205c6e288a01915a46192/geopandas-0.3.0-py2.py3-none-any.whl
Collecting pyproj (from geopandas)
Using cached https://files.pythonhosted.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-1.9.5.1.tar.gz
Complete output from command python setup.py egg_info:
unable to execute 'i586-linux-gnu-gcc': No such file or directory
using bundled proj4..
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-dxjZrU/pyproj/setup.py", line 72, in <module>
objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
File "/usr/lib/python2.7/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python2.7/distutils/unixccompiler.py", line 122, in _compile
raise CompileError, msg
distutils.errors.CompileError: command 'i586-linux-gnu-gcc' failed with exit status 1
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-dxjZrU/pyproj/
I also looked other questions in this website about similiar problems, most of people recommend to update the setuptools, i have done that and still doesn't work, here the prove:
root#debian:~# pip install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages (39.2.0)
If anyone could help me with that i will be really happy
Thanks
Debian 8 Jessie, 32bit
'i586-linux-gnu-gcc': No such file or directory
# apt install g++ gfortran python-all-dev python-numpy libgdal-dev libgeos-dev python-matplotlib
# pip install geopandas
.
.
Running setup.py install for munch
Successfully installed geopandas shapely pandas fiona descartes pyproj python-dateutil numpy cligj click-plugins munch enum34 click
Cleaning up...

Version conflict while installing flup

I'm trying to get a django site up on bluehost. I already have one running using python2.7, but for this new project I am using python3.5. I've pretty much tried to set everything up the same way that I did before, except using python3. When trying to install flup:
pip3 install flup
but I am getting an error:
Collecting flup
Using cached flup-1.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/var/tmp/pip-build-mzc6swh8/flup/setup.py", line 2, in <module>
from ez_setup import use_setuptools
File "/var/tmp/pip-build-mzc6swh8/flup/ez_setup.py", line 98
except pkg_resources.VersionConflict, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /var/tmp/pip-build-mzc6swh8/flup
I am guessing that this instance is flup is seeing my python2 version of flup or something and throwing an error. Any ideas on how to solve this?
Also, I've seen this, but that's not the issue I am having.
The answer is here:
https://stackoverflow.com/a/27703117/1378264
(install flup6 instead flup because flup does not work with python3)
Use flipflop instead
pip3 install --upgrade flipflop
flipflop is what did the trick for me.
flup-py3 has an unresolved issue which has been standing open for a couple of years now.
Do not forget to edit the import line in your .fcgi script to reflect this change towards using flipflop.

How to install and run the reindent.py

I have downloaded the Reindent-0.1.0 and trying to use this for automated indention purpose.
I don't know how to install and run these commands and while I am trying to use this command
I am getting following error
command:
C:\Python26\Scripts\Reindent-0.1.0>Python setup.py
C:\Python26\Scripts\Reindent-0.1.0>Pyth
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from setuptools import setup
ImportError: No module named setuptools
I don't understand the setuptools, where it is and how to put inside
please note my folder files in Reindent-0.1.0
Reindent.egg-info
PKG-INFO
README
reindent
setup.cfg
setup.py
Also how can I run the commands for reindent, for an example, once after I installed the reindent, if I want to
run dryrun command how I should write?
If I write like this, will it be correct ???
C:\ProjFolder\ApplicationDevelopment\GUI>reindent -d Test.py
some realtime example of "-d (--dryrun) Dry run and -r (--recurse) Recurse" will be helpful!!
and where I should target the command file path, in dos
to my application running directory or C:\Python26\Scripts\Reindent-0.1.0 ?? OR Application development folder??
If you get the error "no module X" when you try to run some code, that code has a dependency on module X. When you run setup.py and it says there is no module named "setuptools", it is telling you that setup.py requires the module "setuptools". Since you don't have "setuptools" installed on your machine, you get the error.
The fix is simple: install the setuptools module. Here's one of several places on the internet that shows you how to install setuptools: https://pythonhosted.org/an_example_pypi_project/setuptools.html