Claudio Franchini
Claudio Franchini

Reputation: 1

Trouble with Python package import command in Spyder5

I need to use a package not included in the Anaconda repository (https://github.com/NxRLab/ModernRobotics). I followed the instructions in the official Anaconda documentation and installed, running the Anaconda command terminal as administrator, pip and then followed the package of interest with the command

pip install modern-robotics

and I get a positive result of the installation as feedback.

Afterwards I checked the presence of the package with conda list and then, for greater security, from Anaconda Navigator Environment, seeing it regularly installed.

Now, in a python script in Spider5, I entered import modern-robotics as mr, but I get the red error incorrect syntax.

Invalid syntax pyfLakes E

From the Code Analyzer report in Spyder IDE, I've

************* Module robotics_test E0001:syntax-error: 11,14: Parsing failed: 'invalid syntax (<unknown>, line 11)'

But the package is there ! Having suspected that there might be inconsistencies in the updating of the packages as seen by Spider IDE, I closed the entire environment (including Anaconda Navigator) and restarted it, but the problem remains. Needless to say, I also trivially turned the PC off and on again.

I am not a guru of Python or other languages, I use them for scientific needs, but now I don't understand the origin of the error.

Upvotes: 0

Views: 34

Answers (0)

Related Questions