Giter Site home page Giter Site logo

Comments (12)

ryanvolz avatar ryanvolz commented on July 27, 2024

Hmmm. If it's saying that it cannot import gnuradio, then it must have a problem with the Python path. Conda is usually pretty good about making that work in a variety of situations, but you may have some other installation of Python that is interfering. Stick to the Conda prompt and see if you can figure out how deep the problem runs. This is what I see trying the following commands:

(base) C:\Users\rvolz>where python
C:\Users\rvolz\radioconda\python.exe
C:\Users\rvolz\AppData\Local\Microsoft\WindowsApps\python.exe

(base) C:\Users\rvolz>echo %PYTHONPATH%
%PYTHONPATH%

Key results are that the radioconda python.exe comes first, and %PYTHONPATH% is unset so that nothing is overriding the default.

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

I never ran python on that computer; hence, there was no python installation prior to that of Radioconda.
That's what I see when trying to type the commands you suggested:
(base) C:\Users\ernst.otto>where python
C:\Users\ernst.otto\AppData\Local\conda1\python.exe
C:\Users\ernst.otto\AppData\Local\Microsoft\WindowsApps\python.exe

(base) C:\Users\ernst.otto>python.exe
Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 06:57:19) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

SyntaxError: invalid syntax

echo %PYTHONPATH%
File "", line 1
echo %PYTHONPATH%
^
SyntaxError: invalid syntax
echo %PYTHONPATH
Traceback (most recent call last):
File "", line 1, in
NameError: name 'echo' is not defined

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

it does not seem to like % after PYTHONPATH
also, echo -command is not recognized
the location of .exe file looks correct otherwise?

from radioconda.

ryanvolz avatar ryanvolz commented on July 27, 2024

(base) C:\Users\ernst.otto>python.exe Python 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 06:57:19) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

SyntaxError: invalid syntax

echo %PYTHONPATH%
File "", line 1
echo %PYTHONPATH%
^
SyntaxError: invalid syntax
echo %PYTHONPATH
Traceback (most recent call last):
File "", line 1, in
NameError: name 'echo' is not defined

Oh, the echo %PYTHONPATH% line is meant to be executed from the Conda prompt and not within the Python interpreter.

the location of .exe file looks correct otherwise?

Yeah, that looks good. And running python launches the correct conda-forge version. I'm stumped.

After launching the Python interpreter (python.exe), can you report what the following code returns?

import sys
print(sys.path)

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

OK i opened a Conda prompt window and typed echo %PYTHONPATH% there:
(base) C:\Users\ernst.otto>echo %PYTHONPATH%
%PYTHONPATH%

Then, after launching python.exe

import sys
print(sys.path)
['', 'C:\Users\ernst.otto\AppData\Local\conda1\python310.zip', 'C:\Users\ernst.otto\AppData\Local\conda1\DLLs', 'C:\Users\ernst.otto\AppData\Local\conda1\lib', 'C:\Users\ernst.otto\AppData\Local\conda1', 'C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages', 'C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\win32', 'C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\win32\lib', 'C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\Pythonwin']

from radioconda.

ryanvolz avatar ryanvolz commented on July 27, 2024

Thanks. My installation reports essentially the same, but without the last 3 entries (\win32, \win32\lib, \Pythonwin). Since they come at the end and the other ones look right, I don't think they would have any effect. But it's still curious to me.

You said import gnuradio errored. How about some other things, like import math and import numpy?

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

import math :
on Conda prompt directly
(base) C:\Users\ernst.otto>import math
'import' is not recognized as an internal or external command,
operable program or batch file.
after launching python.exe :

import math

import numpy
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy_init_.py", line 143, in
from . import lib
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\lib_init_.py", line 25, in
from .index_tricks import *
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\lib\index_tricks.py", line 12, in
import numpy.matrixlib as matrixlib
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\matrixlib_init_.py", line 4, in
from .defmatrix import *
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\matrixlib\defmatrix.py", line 11, in
from numpy.linalg import matrix_power
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\linalg_init_.py", line 73, in
from . import linalg
File "C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\linalg\linalg.py", line 34, in
from numpy.linalg import _umath_linalg
ImportError: cannot import name 'umath_linalg' from partially initialized module 'numpy.linalg' (most likely due to a circular import) (C:\Users\ernst.otto\AppData\Local\conda1\lib\site-packages\numpy\linalg_init.py)

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

import math

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

import math

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

this interface does not like >

from radioconda.

ottomc2 avatar ottomc2 commented on July 27, 2024

hence, my text looks weird when i type >>> in the beginning.
there is no responce on import math; it just returns: >>>
that's it

from radioconda.

ryanvolz avatar ryanvolz commented on July 27, 2024

So the standard library package built into Python (math) works, but not an external package (numpy). I don't know what that tells us and will have to think about it for a little bit.

from radioconda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.