Code Monkey home page Code Monkey logo

Comments (8)

williamnavaraj avatar williamnavaraj commented on August 25, 2024 2

Google search brought me here. While using the source from this repo works, alternative is to install the correct package.
python -m pip uninstall stl and
python -m pip install numpy-stl

from numpy-stl.

wolph avatar wolph commented on August 25, 2024

My guess is that something in your namespace is called stl as well.

Can you test the following code?

import stl
print(stl)
print(stl.__file__)

from numpy-stl.

wolph avatar wolph commented on August 25, 2024

Closing due to inactivity

from numpy-stl.

kocendova avatar kocendova commented on August 25, 2024

Hi, I'm having this error too. I also tested the code you provided but it said:

AttributeError: module 'stl' has no attribute 'file'

Could you, please, help me?

Thank you .

from numpy-stl.

wolph avatar wolph commented on August 25, 2024

This issue is often caused by having a file named stl in your current directory.

Can you show the output from the lines above the error? It should show something

from numpy-stl.

darkcurrent avatar darkcurrent commented on August 25, 2024

This issue is often caused by having a file named stl in your current directory.

Can you show the output from the lines above the error? It should show something

Thats it. It escaped me :)

from numpy-stl.

mhk4zemi avatar mhk4zemi commented on August 25, 2024

probably you are also using stl package at the same time and your system is confused which one of them should be considered.
I suggest deleting the stl package by performing this command.

pip uninstall stl

from numpy-stl.

herdima avatar herdima commented on August 25, 2024

I had the same issue on Windows 10. Trying to use numpy-stl as described in its documentation gave this error message: ModuleNotFoundError: No module named 'stl'.
Uninstallation of stl and numpy-stl with subsequent reinstallation of numpy-stl did not change that.

An error regarding setuptools was shown only when going into
~/appdata/Local/Programs/Python/Python38-32/lib/site-packages
and doing python -m pip install numpy-stl from there.
I uninstalled and reinstalled setuptools, wheels and numpy-stl and put $HOME/.local/bin into my search path in ~/.bashrc as was recommemded during one of those installations. This fixed the problem for me.

It seems that the outdated version of setuptools contained easy_install which is not part of newer versions anymore. Possibly my outdated version of setuptools still dated from Python 2.

from numpy-stl.

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.