kivy / pyobjus

Access Objective-C classes from Python
https://pyobjus.readthedocs.io
MIT License
179 stars 47 forks source link

Error while installation: ERROR: The tar file (...) has a file (...) trying to install outside target directory (...) #72

Closed rutvikbhatt closed 1 year ago

rutvikbhatt commented 3 years ago

My system Information: OS: Windows 10 python --version: Python 3.7.4 pip --version: pip 20.3 from ...\kivy_venv\lib\site-packages\pip (python 3.7) Cython.__version__: '0.29.21'

When I try to install pyobjus via pip install pyobjus I get the following error:

The tar file (C:\Users\<username>\AppData\Local\Temp\pip-unpack-7ayiqdx3\pyobjus-1.2.0.tar.gz) has a file (C:\Users\<username>\AppData\Local\Temp\pip-install-vylrktj0\pyobjus_50784346373745f7934152638e263086\objc_classes/aux) trying to install outside target directory (C:\Users\<username>\AppData\Local\Temp\pip-install-vylrktj0\pyobjus_50784346373745f7934152638e263086)

If I clone this GitHub repository and then try to run the setup.py I get the following Pyobjus platform is win32 Traceback (most recent call last): File "setup.py", line 35, in <module> class PyObjusBuildExt(build_ext, object): NameError: name 'build_ext' is not defined

From a forum then I found the other way to install it pip install https://github.com/kivy/pyobjus/archive/master.zip When doing that I get the following error: `ERROR: Could not install packages due to an EnvironmentError: [WinError 267] The directory name is invalid: 'C:\Users\\AppData\Local\Temp\pip-req-build-_4lcptd1\objc_classes/aux'

I tried to find the fix for each of these errors but turned up empty-handed. Some help would be really appreciated as I need this library.

Many thanks.

drjjjm18 commented 3 years ago

Hi, did you make any progress with this? I'm running into the same error

pakal commented 2 years ago

The "aux" directory name is somehow forbidden under Windows, thus giving the third error. To solve this, the codebase should have the folder name changed.

brentpicasso commented 1 year ago

I just ran into this issue; anything we can do to fix it? Having this working under windows is important.

Thanks!

brentpicasso commented 1 year ago

Seems like windows is complaining about the aux path. Any hints on how that is being added to the path? I have searched the code for it.


  Downloading https://github.com/kivy/pyobjus/archive/refs/heads/master.zip
     - 192.1 kB 12.7 MB/s 0:00:00
ERROR: Could not install packages due to an OSError: [WinError 267] The directory name is invalid: 'C:\\Users\\brent\\AppData\\Local\\Temp\\pip-req-build-qfhojfav\\objc_classes/aux'```
brentpicasso commented 1 year ago

I'm catching up on this issue - seems like it is the aux folder name. Posted some suggestions here : https://github.com/kivy/pyobjus/issues/44

Julian-O commented 1 year ago

Closing as duplicate of #44.