0

I am currently moving from Python 2 to Python 3, and I found that one of the packages that I use is currently in Python3 only through a pull-request.

So, I decided to checkout the repository, and checkout the pull-request. I checked and this pull-request only updates a .py file which contains all the coding for the package.

Then, I tried to install the package (being on my computer locally) with pip:

python .\Scripts\pip3.exe install --upgrade --no-index --find-links=. C:\Users\DASTe\PycharmProjects\pyosc 

However, I'm getting the following error:

Looking in links: . Processing c:\users\date\pycharmprojects\pyosc ERROR: Command errored out with exit status 1: command: 'C:\Users\DASTe\PycharmProjects\DASTeNer\server_py3\python_win32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DASTe\\AppData\\Local\\Temp\\pip-req-build-xhcdcl8u\\setup.py'"'"'; __file__='"'"'C:\\Users\\DASTe\\AppData\\Local\\Temp\\pip-req-build-xhcdcl8u\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: C:\Users\DASTe\AppData\Local\Temp\pip-req-build-xhcdcl8u\ Complete output (5 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\DASTe\AppData\Local\Temp\pip-req-build-xhcdcl8u\setup.py", line 5, in <module> import OSC ModuleNotFoundError: No module named 'OSC' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 

This happens in the setup.py file from the package. I have googled, and it appears that in Python 3, the relative imports are done using from . import OSC. However, when I switch that line from setup.py, I get another error:

File "C:\Users\DASTe\AppData\Local\Temp\pip-req-build-7g6v4fwu\setup.py", line 5, in <module> from . import OSC ImportError: cannot import name 'OSC' from '__main__' (C:\Users\DASTe\AppData\Local\Temp\pip-req-build-7g6v4fwu\setup.py) 

Any clue, please?

Many thanks!

2
  • What happens if you run .\Scripts\pip3.exe instead of python .\Scripts\pip3.exe? Commented Sep 4, 2019 at 13:25
  • Thanks for your reply. I get the exact same errors. I bet this is just due imports in Python3, but I can't figure it out, sadly Commented Sep 4, 2019 at 13:29

1 Answer 1

1

It looks like this library has not been maintained since 2011. The pull-request you linked has not been reviewed.

In the short term, I would remove the line import OSC from setup.py and replace OSC.version with ("0.3","6", "$Rev: 6382 $"[6:-2]), see if it works.

In the long term, I think you will have to take over maintaining this project yourself if you want to keep using it.

Sign up to request clarification or add additional context in comments.

1 Comment

This isn't relevant to your question per se, but every time you change an item in OSCMessage, or extend it, or delete an item or insert one, it does that by copying its payload, making the changes in that copy, and then rebuilding the entire payload from scratch based on the copy. I just needed to rant about that.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.