2

this problem, I have when try install package netstat with pypi

[opmeitle@localhost ~]$ sudo pip install netstat
[sudo] password for opmeitle: 

Downloading/unpacking netstat
  Running setup.py egg_info for package netstat

    file nester_g:.py (for module nester_g:) not found
Installing collected packages: netstat
  Running setup.py install for netstat
    file nester_g:.py (for module nester_g:) not found
    file nester_g:.py (for module nester_g:) not found
    warning: install_lib: 'build/lib' does not exist -- no Python modules to install


    file nester_g:.py (for module nester_g:) not found
    file nester_g:.py (for module nester_g:) not found
Successfully installed netstat
Cleaning up...

and other question: how to install packages in python2.7 and not in 3?

opmeitle
  • 195
  • 6
  • 19

2 Answers2

3

While Kugel's answer is perfectly valid, I would also urge you to avoid system wide install, and to use a virtualenv. It will allow you to create a sandbox for your project and isolate it from others.

When creating a virtualenv, you can specify the Python interpreter version you want to use. For example, for python2.7:

$ virtualenv path/to/project -p /usr/bin/python2.7

Then, a pip install command will automatically install the package for python2.7.

Community
  • 1
  • 1
Balthazar Rouberol
  • 6,822
  • 2
  • 35
  • 41
2
  1. The package you mention is corrupted / incomplete. Download source code from here and you can see there is only setup.py and no other source code. Beside that, the homepage is a broken link.

  2. To install for a different version of python use pip-2.7 install xxx. There is usually a pip-x.y for each python version you have installed.

Kugel
  • 19,354
  • 16
  • 71
  • 103