Opened 9 years ago

Closed 9 years ago

#48721 closed defect (invalid)

unable to import py27-netcdf4

Reported by: oliverangelil (Oliver Angélil) Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port:

Description

Dear administrators,

'sudo port install py27-netcdf4' seems to install the port without error, but in python 2.7.10 I cannot import it: 'import netCDF4' mentions there is no such port.

When I list my installed ports ('port installed') I can see the port in the list.

Thanks,

Oliver

Change History (8)

comment:1 Changed 9 years ago by seanfarley (Sean Farley)

Owner: changed from macports-tickets@… to sean@…
Status: newassigned

Yeah, I see this as well. Do you have any mpi variants selected?

comment:2 Changed 9 years ago by seanfarley (Sean Farley)

Can you post the output of port installed netcdf?

comment:3 Changed 9 years ago by seanfarley (Sean Farley)

Are you sure you're not in virtual environment or something like that?

comment:4 in reply to:  3 Changed 9 years ago by oliverangelil (Oliver Angélil)

Replying to sean@…:

Are you sure you're not in virtual environment or something like that?

I am not sure if python is even reading anything that I have installed with MacPorts. For example 'port installed py27-numpy', produces: 'py27-numpy @1.9.2_2+gfortran (active)', but in python 'import numpy; numpy.version' produces: '1.8.0rc1' (an older version).

comment:5 Changed 9 years ago by seanfarley (Sean Farley)

Did you use port select python? Which one is currently active?

comment:6 in reply to:  5 Changed 9 years ago by oliverangelil (Oliver Angélil)

Replying to sean@…:

Did you use port select python? Which one is currently active?

'port select --list python'

produces:

'none (active) python26-apple python27 python27-apple'

but 'port installed python27', produces: 'python27 @2.7.10_3 (active)'

comment:7 Changed 9 years ago by oliverangelil (Oliver Angélil)

After typing 'sudo port select --set python python27', I can import netCDF4 and numpy. Now my original issue persists in python: after exiting python (ctr+d), text I type in bash is invisible. This might be an issue specific to me and my config. I will have to google it more. Thanks a lot for the help.

comment:8 in reply to:  7 Changed 9 years ago by seanfarley (Sean Farley)

Resolution: invalid
Status: assignedclosed

Replying to molofishy@…:

After typing 'sudo port select --set python python27', I can import netCDF4 and numpy. Now my original issue persists in python: after exiting python (ctr+d), text I type in bash is invisible. This might be an issue specific to me and my config. I will have to google it more. Thanks a lot for the help.

Glad you got it working. Typing 'reset' will fix the invisible typing. But there's something deeper going on.

Note: See TracTickets for help on using tickets.