[MacPorts] #48721: unable to import py27-netcdf4
#48721: unable to import py27-netcdf4 -------------------------+-------------------------------- Reporter: molofishy@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Keywords: | Port: -------------------------+-------------------------------- 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 -- Ticket URL: <https://trac.macports.org/ticket/48721> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Changes (by sean@…): * owner: macports-tickets@… => sean@… * status: new => assigned Comment: Yeah, I see this as well. Do you have any mpi variants selected? -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by sean@…): Can you post the output of `port installed netcdf`? -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by sean@…): Are you sure you're not in virtual environment or something like that? -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by molofishy@…): Replying to [comment:3 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). -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by sean@…): Did you use `port select python`? Which one is currently active? -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by molofishy@…): Replying to [comment:5 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)' -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+---------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: | --------------------------+---------------------- Comment (by 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. -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#48721: unable to import py27-netcdf4 --------------------------+-------------------- Reporter: molofishy@… | Owner: sean@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: invalid | Keywords: Port: | --------------------------+-------------------- Changes (by sean@…): * status: assigned => closed * resolution: => invalid Comment: Replying to [comment:7 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. -- Ticket URL: <https://trac.macports.org/ticket/48721#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts