GithubHelp home page GithubHelp logo

ModuleNotFoundError about portalocker HOT 10 CLOSED

wolph avatar wolph commented on May 24, 2024
ModuleNotFoundError

from portalocker.

Comments (10)

wolph avatar wolph commented on May 24, 2024

Sounds like you don't have portalocker installed in that case. Installing could help

from portalocker.

MMK21Hub avatar MMK21Hub commented on May 24, 2024

from portalocker.

wolph avatar wolph commented on May 24, 2024

My guess would be that you've installed it for a different python version, some python installations don't come with pip which cause these weird issues.

Try this: python -m pip install -U portalocker

from portalocker.

MMK21Hub avatar MMK21Hub commented on May 24, 2024

The command outputs:

Requirement already up-to-date: portalocker in c:\python27\lib\site-packages (1.7.0)
Requirement already satisfied, skipping upgrade: pywin32!=226; platform_system == "Windows" in c:\python27\lib\site-packages (from portalocker) (228)

and the issue still persists.

from portalocker.

wolph avatar wolph commented on May 24, 2024

Do you have a local file named portalocker by any chance? Something like that could cause these issues

from portalocker.

MMK21Hub avatar MMK21Hub commented on May 24, 2024

No possibly problematic folder names. Even running it from the command line gives an error. However, in Python 2 it works fine.

from portalocker.

wolph avatar wolph commented on May 24, 2024

You can look at the output from importlib, perhaps it sheds a little light as to what is being imported:

import importlib
print(importlib.util.find_spec('portalocker'))

from portalocker.

MMK21Hub avatar MMK21Hub commented on May 24, 2024

It doesn't look like that helped much:

========================= RESTART: D:/!TEMP/fsgrb.py =========================
None

from portalocker.

wolph avatar wolph commented on May 24, 2024

Well... I'm a bit stumped. You could try from a different directory

Or you can simply download the all-in-one portalocker.py file from the releases: https://github.com/WoLpH/portalocker/releases/download/v1.7.0/portalocker.py

from portalocker.

MMK21Hub avatar MMK21Hub commented on May 24, 2024

Weird.

Python doesn't seem to be able to import some of the other modules in portalocker.py either. (It can do things like os fine though.) Oh well. Thanks for your replies!

from portalocker.

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.