GithubHelp home page GithubHelp logo

amb / blender_pip Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 15.0 35 KB

A Blender addon for managing Python modules inside Blender with PIP

License: GNU General Public License v3.0

Python 99.48% Batchfile 0.52%
blender-addon pip

blender_pip's People

Contributors

amb avatar hannesdelbeke avatar tin2tin avatar unwave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender_pip's Issues

Does not work with Blender 3.0

Under Blender 3.0, the addon panel for Python Module Manager no longer offers the interface for listing/installing/removing modules -- it just shows the basic information (version, description, etc) for the addon, but none of the functional bits. It would be absolutely lovely to see an update to fix this!

(attached a screenshot of the entire panel to show this, though I doubt you'll need it!)

image

pip update is done in userdata, but pip lives in the blender install folder

upgrade pip currently installs pip to user folder instead of system folder.
believe this results in 2 pip modules installed. and not on PATH so cant be run from subprocess

image

['C:\\Program Files\\Blender Foundation\\Blender 3.2\\3.2\\python\\bin\\python.EXE', '-m', 'ensurepip', '--default-pip']
['C:\\Program Files\\Blender Foundation\\Blender 3.2\\3.2\\python\\bin\\python.EXE', '-m', 'pip', 'install', '--upgrade', 'pip']
>>> ERROR
0
  WARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:\Users\user\AppData\Roaming\Python\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: You are using pip version 21.2.4; however, version 23.1.2 is available.
You should consider upgrading via the 'C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\bin\python.EXE -m pip install --upgrade pip' command.

pip upgrade should detect where pip is installed. and upgrade that one

Blender packages are installed to the user appdata, resulting in bugs

blender pip installs to user folder in python path
but by default blender ignores the python path, causing the installed module to not be found on startup

image

i noticed that blender_pip_addon adds site_dir to the path. which solves this issue, but only if this addon is enabled.
in this PR i suggested to remove this behaviour

proposal

A better solution would be to install to the blender installation site packages, or at least give the user the option in a setting screen to do so. This will result in a clean install where modules are found as expected, without changing the environment for blender.

Console warning in 2.93 Alpha

From the console when starting Blender 2.93 with Python 3.9:

Blender PIP user site: C:\users....\appdata\roaming\Python\Python39\site-packages
C:\users............\blender_pip_init_.py:36: RuntimeWarning: Use 'sys.executable' instead of 'binary_path_python'! python_bin = bpy.app.binary_path_python

My question is, is this an error connected to Python 3.9 or has this always been there even with Python 3.7 and I'd simply not noticed?

Irrelevant issue with 2.92 in Alpha

Titled as irrelevant as this is in 2.92 and I'm aware it could disappear on its own tomorrow but I thought you might see something in the log that could be more than me impatiently using alpha versions of Blender:

image

Extremely minor: Use 'sys.executable' instead of 'binary_path_python'

Starting blender with blender_pip enabled gives the following warning on the console:

/Users/<user>/Library/Application Support/Blender/2.91/scripts/addons/blender_pip/__init__.py:34: RuntimeWarning: Use 'sys.executable' instead of 'binary_path_python'!

Where line 34 is (surprise):

python_bin = bpy.app.binary_path_python 

It looks like sys.executable has existed since roughly the dawn of time, and seems to be correctly set by Blender's internal python, so it shouldn't be harmful to swap out, just to get one fewer warning messages on the blender console.

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.