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

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.

Related

ERROR: command "pkg-config --modversion libgphoto2" failed

I am getting an error when I try to install Gphoto2 on my windows pc.
I have tried installing following the instructions from https://pypi.org/project/gphoto2/ and downloading the zip from git clone https://github.com/jim-easterbrook/python-gphoto2.git but have had no success.
This module is supposed to install successfully.
Using the PYPI https://pypi.org/project/gphoto2/
I have tried to follow and install this module also downloading and installing the zip from:
git clone https://github.com/jim-easterbrook/python-gphoto2.git
I have had great difficulty, any advice or suggestion would be greatly appreciated.
C:\Users\Sam\Downloads\python-gphoto2-master\python-gphoto2-master> python setup.py install
ERROR: command "pkg-config --modversion libgphoto2" failed
This module Gphoto2 is supposed to install successfully.
This is what the complete error says:
C:\Users\Sam\Downloads\python-gphoto2-master\python-gphoto2-master>
python setup.py install ERROR: command "pkg-config --modversion
libgphoto2" failed Traceback (most recent call last): File "setup.py",
line 36, in <module> cmd, stderr=FNULL,
universal_newlines=True).split('.') File
"C:\python27\lib\subprocess.py", line 212, in check_output process =
Popen(stdout=PIPE, *popenargs, **kwargs) Windows: [Error 2] The system cannot find the file specified
I'm the author of python-gphoto2.
Python-gphoto2 is not expected to work on Windows. The PyPI page (https://pypi.org/project/gphoto2/) shows the supported operating systems - MacOS and POSIX compatible (e.g. Linux).
I have been able to install it in MSYS2 (http://www.msys2.org/) but it isn't useful unless you get Windows to use libusb instead of its normal driver for your camera.

Can't install scimath in Python 2.7 to custom directory

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.

PyMC installation error with pip

I am attempting to install PyMC using pip install pymc. I believe this command should install PyMC 2.3.6.
PyMC has a few dependencies, which I have in my PATH. I am running OSX 10.11.2 and my PATH includes Python 2.7.13, NumPy 1.12.0, Matplotlib 2.0.0, gcc, and gfortran.
Python (including pip) was installed using Homebrew. NumPy and Matplotlib were installed using pip. The gfortran compiler was downloaded and installed from the GCC Wiki for the purpose of this installation.
Executing pip install pymc yielded lots of output including the following lines.
Collecting pymc
Using cached pymc-2.3.6.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
running build_src
build_src
building extension "pymc.flib" sources
f2py options: ['skip:ppnd7']
f2py:> build/src.macosx-10.11-x86_64-2.7/pymc/flibmodule.c
creating build
creating build/src.macosx-10.11-x86_64-2.7
creating build/src.macosx-10.11-x86_64-2.7/pymc
IOError: [Errno 2] No such file or directory: 'skip:ppnd7'. Skipping file "skip:ppnd7".
updatevars:gradlike: attempt to change 'dimension(nx)' to 'dimension(na)'. Ignoring.
updatevars:gradlike: attempt to change 'dimension(nx)' to 'dimension(nb)'. Ignoring.
updatevars:gradlike: attempt to change 'dimension (nmu)' to 'dimension(nmu)'. Ignoring.
updatevars:gradlike: attempt to change 'dimension (na)' to 'dimension(na)'. Ignoring.
rmbadname1: Replacing "index" with "index_bn".
Reading fortran codes...
Reading file 'pymc/flib.f' (format:fix,strict)
Line #34 in pymc/flib.f:" PARAMETER (infinity = 1.7976931348623157d308)"
get_parameters: got "unexpected EOF while parsing (<string>, line 0)" on ''
...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/2f/cr97n5v93mn04c3qbqd7r3q40000gn/T/pip-build-6Zmgcz/pymc/setup.py", line 124, in <module>
**(config_dict))
File "/usr/local/lib/python2.7/site-packages/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
...
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/2f/cr97n5v93mn04c3qbqd7r3q40000gn/T/pip-build-6Zmgcz/pymc/
As suggested in these two pip installation threads about egg_info errors [1, 2], I ran pip install —upgrade setuptools and pip install ez_setup. Once these items were installed I ran into the same types of errors pasted above.
As noted in other package installation threads, I am willing to use conda to install PyMC if I cannot resolve these issues. However, I'd like to investigate this installation issue first.
Would anyone happen to know what my issue is here? Might there be some steps I can take to successfully install PyMC using pip?
I had the same problem. I don't understand the root cause, but I fixed it by downgrading numpy to version 1.10.1: pip install numpy==1.10.1
I also met this problem while trying to install pymc from pip or source code, but I found a solution that might be useful.
The reason that causes the problem might be the file setup.py, in which the script check the compile env. I didn't read the code very carefully, but in the function build_ext() I think the codes first check whether some compile environments have already been installed into OS. If installed, the script will use them as defaults; if not, use ones in somewhere else (the comment says 'from netlib sources').
I infer the problem is caused by the compile environments that have already been installed in the OS, so I modify the file setup.py to skip this part of codes, and let the script use the netlib source. Then I run sudo python setup.py install. There are some error and warning messages, but the folder 'pymc' emerges in python library, and some simple test codes run successfully.

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

Cannot create virtualenv in SnowLeopard (MacOS 10.6.8), Python2.7 – errors

I need 'virtualenv' for my current django project. I could install it, and the requested directory
was created with some basic subdirectories (bin, include, lib), but it stops on error messages that just keep me guessing. So I am hoping someone here knows the problem, and can help?
Below is some -hopefully- helpful console text output.
Thanks a lot in advance!
Lena
Problem Description:
Computer config: MacOS 10.6.8 (Snow Leopard), Python 2.7.
1) Creating the virtualenv:
Suesssauer:site-packages sss$ virtualenv --distribute /Users/sss/EclipseProjects/django-projects/DEV
New python executable in /Users/sss/EclipseProjects/django-projects/DEV/bin/python
Please make sure you remove any previous custom paths from your /Users/sss/.pydistutils.cfg file.
COMMENT: fyi – Contents of .pydistutils.cfg
>> [install]
>> install_lib = /Library/Python/$py_version_short/site-packages )
Installing distribute........................................done.
Installing pip....
Complete output from command /Users/sss/Ecli...DEV/bin/python -x
/Users/sss/Ecli...VEL/bin/easy_install /Library/Python/2.7/...pport/pip-1.1.tar.gz:
/Users/sss/EclipseProjects/django-projects/DEV/bin/python:
can't open file '/Users/sss/EclipseProjects/django-projects/DEV/bin/easy_install':
[Errno 2] No such file or directory
COMMENT: That's true, it is missing. But it cannot be my job to copy it there manually, no ?
...Installing pip...done.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenv", line 8,
in <module> load_entry_point('virtualenv==1.7.2', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv.py", line 942, in main
never_download=options.never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1054, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 654, in install_pip
filter_stdout=_filter_setup)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1020, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/sss/Ecli...ork_DEVEL/bin/python -x /Users/sss/Ecli...VEL/
bin/easy_install /Library/Python/2.7/...pport/pip-1.1.tar.gz failed with
error code 2
No idea, the file "/Library/Python/2.7/site-packages/virtualenv_support/pip-1.1.tar.gz" does exist (if this is the one talked about)!
2) Question: Check installation of virtualenv – do I have to consider these warnings below?
Console output:
Suesssauer:site-packages sss$ pip install virtualenv
Downloading/unpacking virtualenv
Downloading virtualenv-1.7.2.tar.gz (2.2Mb): 2.2Mb downloaded
Running setup.py egg_info for package virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing collected packages: virtualenv
Running setup.py install for virtualenv
warning: no previously-included files matching '*' found under directory 'docs/_templates'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing virtualenv script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Installing virtualenv-2.7 script to /Library/Frameworks/Python.framework/Versions/2.7/bin
Successfully installed virtualenv
Cleaning up...
Try “removing” your .pydistutils.cfg file, as requested, before you run virtualenv:
mv /Users/sss/.pydistutils.cfg /Users/sss/.pydistutils.cfg.old
Source: https://groups.google.com/forum/#!msg/python-virtualenv/dKZYWuMcI7Y/Z27XXKF5M4sJ
And I think the error code 2 is due to easy_install as well, not the .tar.gz file.
This is not a direct solution to your problem but I highly recommend you using virtualenv-burrito which is the usual virtualenv packaged with virtualenv-wrapper classes that make organizing your virtualenvs much much easier.
Virtualenv-burrtio: https://github.com/brainsik/virtualenv-burrito