Giter Club home page Giter Club logo

Comments (6)

Z33DD avatar Z33DD commented on August 25, 2024

When I'm try install the package with pip, this happens:

user@computer:~/Programs/hide.py$ pip install PIL
/home/z33dd/.local/lib/python3.5/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
Collecting PIL
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

from hide.py.

nukeop avatar nukeop commented on August 25, 2024

You're using Python 3.5, this script will only run in Python 2.7+.

from hide.py.

Z33DD avatar Z33DD commented on August 25, 2024

I think that find the problem!

I try use with Python 2.7, happens the same:

user@computer:~/Programs/hide.py$ python hide.py
Traceback (most recent call last):
  File "hide.py", line 11, in <module>
    from PIL import Image
ImportError: No module named PIL
user@computer:~/Programs/hide.py$ python --version
Python 2.7.12

It seems the problem is here:

user@computer:~/Programs/hide.py$ pip install PIL --user
/home/z33dd/.local/lib/python3.5/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
Collecting PIL
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

Pip search for a PIL module to "elementary OS 0.4.1 Loki" rather than "Ubuntu 14",

user@computer:~/Programs/hide.py$ cat /etc/*-release
DISTRIB_ID="elementary"
DISTRIB_RELEASE=0.4.1
DISTRIB_CODENAME=loki
DISTRIB_DESCRIPTION="elementary OS 0.4.1 Loki"
NAME="elementary OS"
VERSION="0.4.1 Loki"
ID="elementary"
ID_LIKE=ubuntu
PRETTY_NAME="elementary OS 0.4.1 Loki"
VERSION_ID="0.4.1"
HOME_URL="http://elementary.io/"
SUPPORT_URL="http://elementary.io/support/"
BUG_REPORT_URL="https://github.com/elementary/"
VERSION_CODENAME=loki
UBUNTU_CODENAME=loki
cat: /etc/upstream-release: Is a directory

The big question is "how to download and install the module of another distro with pip?"

from hide.py.

nukeop avatar nukeop commented on August 25, 2024

Yes, because pip is aliased to your machine to pip3, use the version for python 2. Better yet, create a virtual environment.

$ cd hide.py
$ virtualenv -p python2.7 venv
$ source venv/bin/activate
$ pip install -r requirements.txt

Replace python2.7 with the python2 binary on your system.

from hide.py.

Z33DD avatar Z33DD commented on August 25, 2024

Thanks! It's working now!

Ps: Hey guy, has a error here:
$ source venv/bin/acitvate

from hide.py.

nukeop avatar nukeop commented on August 25, 2024

Right, I corrected it for anyone reading this in the future.

from hide.py.

Related Issues (10)

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.