Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute path error in Python 3.7 #51

Closed
aadler opened this issue Jul 19, 2018 · 12 comments
Closed

Absolute path error in Python 3.7 #51

aadler opened this issue Jul 19, 2018 · 12 comments

Comments

@aadler
Copy link

aadler commented Jul 19, 2018

While trying to install version 0.9.1using pip I get the following error:

    reading manifest file 'zstandard.egg-info\SOURCES.txt'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\R\temp\pip-install-aoqr5ae0\zstandard\setup.py", line 96, in <mod
ule>
        install_requires=install_requires,
      File "c:\program files\python37\lib\site-packages\setuptools\__init__.py",
 line 131, in setup
        return distutils.core.setup(**attrs)
      File "c:\program files\python37\lib\distutils\core.py", line 148, in setup

        dist.run_commands()
      File "c:\program files\python37\lib\distutils\dist.py", line 966, in run_c
ommands
        self.run_command(cmd)
      File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_c
ommand
        cmd_obj.run()
      File "c:\program files\python37\lib\site-packages\setuptools\command\insta
ll.py", line 61, in run
        return orig.install.run(self)
      File "c:\program files\python37\lib\distutils\command\install.py", line 55
7, in run
        self.run_command(cmd_name)
      File "c:\program files\python37\lib\distutils\cmd.py", line 313, in run_co
mmand
        self.distribution.run_command(command)
      File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_c
ommand
        cmd_obj.run()
      File "c:\program files\python37\lib\site-packages\setuptools\command\insta
ll_egg_info.py", line 34, in run
        self.run_command('egg_info')
      File "c:\program files\python37\lib\distutils\cmd.py", line 313, in run_co
mmand
        self.distribution.run_command(command)
      File "c:\program files\python37\lib\distutils\dist.py", line 985, in run_c
ommand
        cmd_obj.run()
      File "c:\program files\python37\lib\site-packages\setuptools\command\egg_i
nfo.py", line 278, in run
        self.find_sources()
      File "c:\program files\python37\lib\site-packages\setuptools\command\egg_i
nfo.py", line 293, in find_sources
        mm.run()
      File "c:\program files\python37\lib\site-packages\setuptools\command\egg_i
nfo.py", line 524, in run
        self.add_defaults()
      File "c:\program files\python37\lib\site-packages\setuptools\command\egg_i
nfo.py", line 567, in add_defaults
        self.read_manifest()
      File "c:\program files\python37\lib\site-packages\setuptools\command\sdist
.py", line 199, in read_manifest
        self.filelist.append(line)
      File "c:\program files\python37\lib\site-packages\setuptools\command\egg_i
nfo.py", line 466, in append
        path = convert_path(item)
      File "c:\program files\python37\lib\distutils\util.py", line 110, in conve
rt_path
        raise ValueError("path '%s' cannot be absolute" % pathname)
    ValueError: path '/home/travis/build/indygreg/python-zstandard/zstd.c' canno
t be absolute

    ----------------------------------------
Command ""c:\program files\python37\python.exe" -u -c "import setuptools, tokeni
ze;__file__='C:\\R\\temp\\pip-install-aoqr5ae0\\zstandard\\setup.py';f=getattr(t
okenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();e
xec(compile(code, __file__, 'exec'))" install --record C:\R\temp\pip-record-oala
s6un\install-record.txt --single-version-externally-managed --compile" failed wi
th error code 1 in C:\R\temp\pip-install-aoqr5ae0\zstandard\
@aadler
Copy link
Author

aadler commented Jul 19, 2018

Could it be the fact that I'm using Python 3.7? The porting instructions include the following notes:

When using the -m switch, the initial working directory is now added to sys.path, rather than an empty string (which dynamically denoted the current working directory at the time of each import). Any programs that are checking for the empty string, or otherwise relying on the previous behaviour, will need to be updated accordingly (e.g. by also checking for os.getcwd() or os.path.dirname(main.file), depending on why the code was checking for the empty string in the first place).

The file used to override sys.path is now called ._pth instead of 'sys.path'. See Finding modules for more information. (Contributed by Steve Dower in bpo-28137.)

@aadler
Copy link
Author

aadler commented Jul 30, 2018

I can confirm the issue remains with Python 3.7 and pip 18.0

      File "c:\program files\python37\lib\distutils\util.py", line 110, in conve
rt_path
        raise ValueError("path '%s' cannot be absolute" % pathname)
    ValueError: path '/home/travis/build/indygreg/python-zstandard/zstd.c' canno
t be absolute

    ----------------------------------------
Command ""c:\program files\python37\python.exe" -u -c "import setuptools, tokeni
ze;__file__='C:\\R\\temp\\pip-install-8vndlofn\\zstandard\\setup.py';f=getattr(t
okenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();e
xec(compile(code, __file__, 'exec'))" install --record C:\R\temp\pip-record-vii3
xoo3\install-record.txt --single-version-externally-managed --compile" failed wi
th error code 1 in C:\R\temp\pip-install-8vndlofn\zstandard\

@aadler aadler changed the title Absolute path error? Absolute path error in Python 3.7 Jul 30, 2018
@aadler
Copy link
Author

aadler commented Sep 13, 2018

Any updates?

@austinbenincasa
Copy link

I can confirm that this is an issue for python3.7 on Windows

@austinbenincasa
Copy link

@aadler

I fixed the absolute path issue. Download and untar this archive. Then run

pip install <path to unzipped archive>

zstandard-0.9.1.tar.gz

@decoydoug2
Copy link

You can also install and build the latest version via

python -m pip install git+https://github.com/indygreg/python-zstandard.git

@aadler
Copy link
Author

aadler commented Oct 3, 2018

@decoydoug2 That still does not work.


C:\PROGRA~1\Python37>python -m pip install git+https://github.com/indygreg/python-zstandard.git

Collecting git+https://github.com/indygreg/python-zstandard.git
  Cloning https://github.com/indygreg/python-zstandard.git to c:\r\temp\pip-req-build-0rgjeloz
  Error [WinError 2] The system cannot find the file specified while executing command git clone -q https://github.com/indygreg/python-zstandard.git C:\R\temp\pip-req-build-0rgjeloz
Cannot find command 'git' - do you have 'git' installed and in your PATH?

@austinbenincasa
Copy link

@aadler You need to have Git installed and in your PATH to run @decoydoug2 's command. Downloading the tar I posted and running the command does not require you to have Git installed. However, its probably a good thing to have Git installed on your system if you are going to do development.

@aadler
Copy link
Author

aadler commented Oct 3, 2018

@austinbenincasa Weird. Of course I have git installed (although my repositories are on BitBucket and not github). Maybe it's a path issue. Let me check…

@austinbenincasa
Copy link

@austinbenincasa Weird. Of course I have git installed (although my repositories are on BitBucket and not github). Maybe it's a path issue. Let me check…

I figured you did and it was a PATH issue. Good ole Windows...

@aadler
Copy link
Author

aadler commented Oct 3, 2018

@austinbenincasa I took the opportunity to update to git 2.19 from 2.10.2 and now it installs just as @decoydoug2 suggests. Thanks!

indygreg added a commit that referenced this issue Oct 6, 2018
indygreg added a commit that referenced this issue Oct 6, 2018
indygreg added a commit that referenced this issue Oct 6, 2018
@indygreg
Copy link
Owner

indygreg commented Oct 6, 2018

I'm reasonably certain this is fixed on master.

And I will also publish 3.7 wheels for the next release so 3.7 installs aren't attempting to compile sources.

@indygreg indygreg closed this as completed Oct 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants