Giter Site home page Giter Site logo

Comments (9)

ivankravets avatar ivankravets commented on May 22, 2024

Thanks a lot for report.

  1. Which way did you use to install PlatformIO?
  2. Try close/open your Terminal application.

Is it working fine now? If no, then give me a list of installed Python packages:

$ pip list

from platformio-core.

ariejan avatar ariejan commented on May 22, 2024
  1. pip install platformio & pip install --egg scons (Note the single & as I'm using Fish)
  2. Here you go
$ pip list
base58 (0.2.1)
BeautifulSoup (3.2.1)
bsddb3 (6.0.1)
click (2.5)
doge (3.4.0)
ecdsa (0.10)
GDAL (1.11.0)
mercurial (3.0.2)
PIL (1.1.7)
pip (1.5.6)
platformio (0.5.0)
pycoin (0.23)
Pygments (1.6)
pyserial (2.7)
requests (2.3.0)
setuptools (5.4.2)
vboxapi (1.0)
wsgiref (0.1.2)

I already tried the termanial-hop, been there done that.

from platformio-core.

ivankravets avatar ivankravets commented on May 22, 2024

I know another way how to resolve this issue. But I want to know why this normal way (with installation) doesn't work. Something is wrong with your PYTHONPATH. I've just created "debug" version of main.py file.

Please replace file /usr/local/lib/python2.7/site-packages/platformio/builder/main.py with https://gist.github.com/ivankravets/e3ee819d8c453c37e5ae

The run for your test project:

$ platformio run

You should see a dump of Python system path. Please share it here.

Thanks a lot.

from platformio-core.

ariejan avatar ariejan commented on May 22, 2024

Here you go:

$ platformio run
Processing arduino_mega environment:
['/usr/local/lib/python2.7/site-packages/platformio/builder', '/usr/local/bin/scons-local-2.3.0', '/usr/local/bin/scons-local', '/usr/local/lib/scons-2.3.0', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.3.0', '/usr/local/lib/python2.7/site-packages/scons-2.3.0', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scons-2.3.0', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/scons-2.3.0', '/usr/local/lib/scons', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/scons', '/usr/local/lib/python2.7/site-packages/scons', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scons', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/scons', '/Library/Python/2.7/site-packages/Pygments-1.6-py2.7.egg', '/Library/Python/2.7/site-packages/PIL-1.1.7-py2.7-macosx-10.9-intel.egg', '/Library/Python/2.7/site-packages/BeautifulSoup-3.2.1-py2.7.egg', '/Library/Python/2.7/site-packages/bsddb3-6.0.1-py2.7-macosx-10.9-intel.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages']
ImportError: No module named platformio.util:
  File "/usr/local/lib/python2.7/site-packages/platformio/builder/main.py", line 12:
    from platformio.util import (get_home_dir, get_pioenvs_dir, get_project_dir,

You are not trying to steal my passwords are you? 😉

from platformio-core.

ivankravets avatar ivankravets commented on May 22, 2024

I see a problem. It is /usr/local/lib/python2.7/site-packages/platformio/builder. Something is wrong with your Python Interpreter when code is run from subprocess. The valid item in PythonPath in your case is /usr/local/lib/python2.7/site-packages.

Do you run $ platformio run command with sudo permissions? If yes, try without sudo.

I will create simple "patch" for your case and give your a new main.py. If it works for you, I will merge it to develop branch.

P.S:

You are not trying to steal my passwords are you?

No, I'm a good man :)

from platformio-core.

ariejan avatar ariejan commented on May 22, 2024

Running with sudo gives the same output as without sudo.

from platformio-core.

ivankravets avatar ivankravets commented on May 22, 2024

Try new main.py:

Please replace file /usr/local/lib/python2.7/site-packages/platformio/builder/main.py with https://gist.github.com/ivankravets/e3ee819d8c453c37e5ae

from platformio-core.

ariejan avatar ariejan commented on May 22, 2024

Yes, that works. Well, I get a compile error on my own code, so that's good.

👍

from platformio-core.

ivankravets avatar ivankravets commented on May 22, 2024

Thanks a lot you for patience with several patches! 😉

from platformio-core.

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.